Skip to content

Commit 5c74a41

Browse files
authored
Merge pull request #86 from askgina/fix/perps-only-plugin-contract
docs(perps): align health and radar access
2 parents 4339816 + b86c251 commit 5c74a41

4 files changed

Lines changed: 27 additions & 7 deletions

File tree

docs/perps-mcp/features.mdx

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,9 @@ Start with `host-tools --brief` and `host-tools schema <toolName>` before using
1212
| Feature | What It Does | Example Prompts | Direct Command |
1313
| --------------------- | ----------------------------------------------------------- | ----------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------- |
1414
| **Account State** | View account, margin, positions, open orders, and portfolio | `"show my perps positions"` `"what open orders do I have?"` | `host-tools getHyperliquidPositions` |
15+
| **Account Health** | Snapshot authenticated account exposure and margin | `"check my perps account health"` | `host-tools perps.accountHealth includeExitEstimates=true` |
1516
| **Markets** | List canonical Hyperliquid markets and asset metadata | `"show Hyperliquid markets"` `"what is BTC funding?"` | `host-tools getHyperliquidMarkets` |
17+
| **Market Radar** | Rank markets by activity and compare retained samples | `"radar for active perp markets"` | `host-tools perps.marketRadar limit=10` |
1618
| **Prices** | Fetch one or many live perps prices | `"BTC perps price"` `"price BTC ETH SOL"` | `host-tools getHyperliquidPrice '{\"asset\":\"BTC\"}'` |
1719
| **HIP-3 Discovery** | Search HIP-3 markets and list builder-deployed DEXes | `"search HIP-3 markets for CL"` `"list HIP-3 DEXes"` | `host-tools perps.hip3.search query=CL` |
1820
| **HIP-3 Prices** | Read venue-scoped HIP-3 prices | `"price CL on xyz"` | `host-tools perps.hip3.price '{\"dex\":\"xyz\",\"coin\":\"CL\"}'` |
@@ -25,6 +27,28 @@ Start with `host-tools --brief` and `host-tools schema <toolName>` before using
2527
| **Data Fetching** | Fetch trades, candles, and order books into sandbox tables | `"fetch BTC candles into SQL"` | `host-tools fetchHyperliquidCandles '{\"coin\":\"BTC\",\"interval\":\"1h\"}'` |
2628
| **SQL Analysis** | Query fetched perps data with DuckDB/SQLite-style workflows | `"query large BTC trades"` | `sql query "SELECT * FROM <table> LIMIT 10"` |
2729

30+
<Note>
31+
Account health and market radar require a separately authorized [Perps MCP
32+
connection](/perps-mcp/client-setup) with `tools:execute`. They are not read tools in the Ask Gina
33+
listed plugin.
34+
</Note>
35+
36+
## Account health
37+
38+
`perps.accountHealth` requires an authenticated account. It defaults to canonical Hyperliquid. Pass `providerContext` with `{"providerId":"hip3:xyz"}` for an enabled HIP-3 venue.
39+
40+
The response includes at most 64 positions. Set `includeExitEstimates=true` for indicative exit estimates on at most eight positions, not fill guarantees. The tool does not assign a health score or calculate historical performance.
41+
42+
## Market radar
43+
44+
`perps.marketRadar` accepts `limit` from 1 to 50, defaulting to 10, and an optional `dex`, such as `dex=xyz`. Omit `dex` for canonical Hyperliquid.
45+
46+
Eligible markets rank by descending 24-hour traded volume, then open interest, then absolute 24-hour price change, with coin name breaking ties. This measures activity and exposure, not liquidity, depth, or executable size. Excluded-market details are capped at 100.
47+
48+
Rank, volume, open-interest, and mark-price deltas compare with a shared sample for that venue, not the caller's previous request. Samples rotate no more often than every five minutes and expire after seven days. Rows without a prior entry are marked `firstSeen`.
49+
50+
Radar returns the complete JSON response inline or in an artifact. It does not automatically extract the rows into SQL tables.
51+
2852
## Discovery Flow
2953

3054
Use this sequence when you are unsure which tool to call:

packages/contracts/__tests__/contracts.test.ts

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,6 @@ import {
1111
GinaReadToolCatalogJsonSchema,
1212
PRODUCTION_MCP_URL,
1313
READ_SCOPE,
14-
RELEASE_VERSION,
15-
SOURCE_COMMIT,
1614
catalogSha,
1715
getGinaReadToolAnnotations,
1816
getGinaReadToolFamily,
@@ -201,13 +199,11 @@ describe("@askgina/contracts", () => {
201199
}),
202200
);
203201

204-
it.effect("pins endpoints, scopes, and source compatibility", () =>
202+
it.effect("publishes endpoints and scopes with a computed catalog digest", () =>
205203
Effect.gen(function* () {
206204
assert.strictEqual(PRODUCTION_MCP_URL, "https://askgina.ai/ai/gina/mcp");
207205
assert.strictEqual(READ_SCOPE, "tools:read");
208206
assert.strictEqual(EXECUTE_SCOPE, "tools:execute");
209-
assert.strictEqual(RELEASE_VERSION, "0.1.0");
210-
assert.strictEqual(SOURCE_COMMIT, "51d99dde59e17080255fdb4ae8e59a63355a8b5e");
211207

212208
const computedCatalogSha = createHash("sha256")
213209
.update(yield* Schema.encodeEffect(GinaReadToolCatalogJsonSchema)(GINA_READ_TOOL_CATALOG))

packages/contracts/src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -416,6 +416,6 @@ export const ASK_GINA_SKILL_DEFINITIONS = [
416416
},
417417
] as const satisfies readonly AskGinaSkillDefinition[];
418418

419-
export const SOURCE_COMMIT = "51d99dde59e17080255fdb4ae8e59a63355a8b5e";
419+
export const SOURCE_COMMIT = "ea8c56a0b065ea44cde89d05567999f976c61071";
420420
export const RELEASE_VERSION = "0.1.0";
421421
export const catalogSha = "6738637b18462cafa3f4ffb77c1503515a7f851f9ec4130fa380ada7416d3b7e";

plugins/ask-gina/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ Scope: `tools:read` only. This plugin does not include transaction execution or
6161

6262
1. Install **Ask Gina** from the Cursor / Grok Bot plugin marketplace, or load this folder as a local Cursor plugin (`~/.cursor/plugins/local/ask-gina` as a real directory, not an external symlink).
6363
2. Open the Gina connector and choose **Connect**. Complete Ask Gina OAuth in the browser.
64-
3. Confirm the connector shows the read tools (30 catalog tools). Skills below should appear as well. In Cursor, the four slash commands and the always-on read-only rule should appear too.
64+
3. Confirm the connector shows the read tools (31 catalog tools). Skills below should appear as well. In Cursor, the four slash commands and the always-on read-only rule should appear too.
6565

6666
Grok Bot loads plugins only from the Cursor marketplace. A local `~/.cursor/plugins/local` install proves the Cursor IDE loader, not Grok Bot.
6767

0 commit comments

Comments
 (0)