From 94849f7cac33f740bb5c0b4ecd1c2c38628820a4 Mon Sep 17 00:00:00 2001 From: Eric Juta Date: Mon, 26 Oct 2026 14:35:39 +0000 Subject: [PATCH 1/3] docs(perps): document account events and shared destinations --- ai_docs/write-plugin-tool-justifications.md | 14 +++ docs/perps-mcp/client-setup.mdx | 2 + docs/perps-mcp/features.mdx | 54 +++++++++- docs/perps-mcp/tools.mdx | 92 +++++++++++++--- docs/predictions-mcp/events.mdx | 2 + docs/predictions-mcp/tools.mdx | 16 ++- tools/docs/venue-tools.json | 114 +++++++++++++++++++- tools/docs/venue-tools.mjs | 2 +- 8 files changed, 276 insertions(+), 20 deletions(-) diff --git a/ai_docs/write-plugin-tool-justifications.md b/ai_docs/write-plugin-tool-justifications.md index a7f7078c..73afccb6 100644 --- a/ai_docs/write-plugin-tool-justifications.md +++ b/ai_docs/write-plugin-tool-justifications.md @@ -101,6 +101,18 @@ Only `createHyperliquidTable`, `executeSqlQuery` and `captureAnalysisDataset` ar | `previewHyperliquidOrderCost` | true, false, true | Estimates an order's fill, fee and slippage from the live book without placing it, so it is read only and open world. It suggests placeHyperliquidOrder when the order can fill. | | `getHyperliquidAccountHealth` | true, false, true | Reads a snapshot of account exposure and margin from Hyperliquid. It changes nothing, so it is read only and open world. | | `fetchHyperliquidMarketRadar` | true, false, true | Ranks markets by activity and compares retained samples from Hyperliquid data. It changes nothing, so it is read only and open world. | +| `createPerpsEventSubscription` | false, false, true | Starts linked-account observation after wallet checks. It stores a subscription and requests collection, but places no orders and moves no funds. | +| `listPerpsEventSubscriptions` | true, false, false | Lists stored Perps subscriptions, filters and lifecycle status. It calls no outside provider and changes nothing. | +| `updatePerpsEventSubscription` | false, true, true | Changes filters, delivery destination or lifecycle after wallet checks. It can replace delivery settings or end an invalid binding, but moves no funds. | +| `deletePerpsEventSubscription` | false, true, true | Permanently ends a subscription after wallet checks. It stops account observation and delivery without moving funds. | +| `getPerpsEvents` | false, true, true | Replays retained events and refreshes activity. External wallet checks can close an invalid binding, so it is not read only despite moving no funds. | +| `listWebhookDestinations` | true, false, false | Lists shared destination labels and attachment counts without receiver URLs or secrets. It reads stored account state only. | +| `createWebhookDestination` | false, true, true | Registers a receiver after external URL checks. Credentials can appear in the host transcript, so it requires confirmation. It sends no event and moves no funds. | +| `updateWebhookDestination` | false, false, false | Renames a destination using its current version. It cannot change the URL, kind or credentials and sends no request. | +| `deleteWebhookDestination` | false, true, false | Permanently deletes an unattached destination. Any Perps or Predictions attachment prevents deletion. It sends no request and moves no funds. | +| `rotateWebhookDestinationSecret` | false, true, false | Replaces a signing secret or routine credential under the destination's rotation policy. It changes receiver access, so it requires confirmation. | +| `disableWebhookDestination` | false, true, false | Disables a shared destination and pauses attached subscriptions across both products. This stops delivery and cannot be undone. | +| `sendWebhookTestEvent` | false, false, true | Sends an optional test to a receiver and records its outcome. It can start a real automation or paid routine session, so it is not a read. | | `placeHyperliquidOrder` | false, true, true | Places a market or limit order on Hyperliquid with real funds. It can open leveraged positions and cannot always be undone, so it is destructive and needs host confirmation. | | `placeHyperliquidStopOrder` | false, true, true | Places a stop loss or take profit trigger order on Hyperliquid. The trigger can later close a position with real funds, so it is destructive and needs host confirmation. | | `cancelHyperliquidOrder` | false, true, true | Cancels an open Hyperliquid order. It changes live exchange state and cannot be undone, so it is destructive and open world and needs host confirmation. | @@ -131,6 +143,8 @@ A `splitMergePredictionPosition` split preview returns a typed `next` suggestion | `getAccountAddresses` | true, false, false | Returns your Gina wallet addresses from stored account state. It calls no outside provider and changes nothing, so it is read only and closed world. | | `listScheduledPrompts` | true, false, false | Lists your scheduled prompts from Gina account state. It changes nothing and calls no outside provider, so it is read only and closed world. | | `searchPredictionMarkets` | true, false, true | Searches Polymarket markets. It places no order and changes nothing, so it is read only and open world. | +| `updateWebhookDestination` | false, false, false | Renames a shared destination using its current version. It cannot change the URL, kind or credentials and sends no request. | +| `deleteWebhookDestination` | false, true, false | Permanently deletes an unattached destination. Perps and Predictions attachments prevent deletion. It sends no request and moves no funds. | | `getExpiringMarkets` | true, false, true | Reads Polymarket markets that end soon. It changes nothing, so it is read only and open world. | | `getPredictionSportsEvents` | true, false, true | Reads Polymarket sports events and their markets by league, team or date. It places no order and changes nothing, so it is read only and open world. | | `getPredictionSubjectMarkets` | true, false, true | Reads Polymarket markets about one subject, such as a person, company or asset. It changes nothing, so it is read only and open world. | diff --git a/docs/perps-mcp/client-setup.mdx b/docs/perps-mcp/client-setup.mdx index ae7129ac..2eccc683 100644 --- a/docs/perps-mcp/client-setup.mdx +++ b/docs/perps-mcp/client-setup.mdx @@ -53,6 +53,8 @@ The credential must be valid for this venue and carry `tools:execute`. A read-on Next: run the [read-only connection checks](/perps-mcp/quick-start) before attempting execution. +For account notifications without placing an order, follow [Account events](/perps-mcp/features#account-events). They use this same authenticated connector and its linked wallet, but need no trading delegation. A pull subscription needs no receiver or signing secret. + ## Check that it works Restart the client and complete Gina OAuth. In Claude Code, `/mcp` should list `perps` as connected, and `bash` should appear in the tool list. Call `bash` with: diff --git a/docs/perps-mcp/features.mdx b/docs/perps-mcp/features.mdx index 9a0c1df5..d8744980 100644 --- a/docs/perps-mcp/features.mdx +++ b/docs/perps-mcp/features.mdx @@ -1,6 +1,6 @@ --- -title: "Features Table" -description: "Complete reference of Perps MCP capabilities with example prompts and commands" +title: "Perps features" +description: "Use Perps MCP to inspect your account, manage event subscriptions and execute orders." --- Complete reference of Perps MCP capabilities. You can prompt naturally, or ask your client to call the native tool shown. @@ -40,6 +40,54 @@ Complete reference of Perps MCP capabilities. You can prompt naturally, or ask y Set `includeExitEstimates=true` for indicative exit estimates on a capped number of positions. They are not fill guarantees. The tool does not assign a health score or calculate historical performance. +## Account events + +Connect `https://askgina.ai/ai/perps/mcp` and complete [Perps authentication](/perps-mcp/client-setup) with `tools:execute`. This connector also exposes trading tools, but account observation needs no trading delegation and moves no funds. It watches your Gina-linked embedded Hyperliquid account, not arbitrary addresses. Existing subscriptions keep their original wallet if you change a wallet preference. + +Account events cover Main, supported xyz markets and shared collateral in current standard, unified and portfolio-margin accounts. The protocol name is `perps.account.v1`; its payload `kind` distinguishes account changes, labelled initial snapshots and health. This is not a price-tick feed or a complete historical accounting ledger. Unsupported source forms produce explicit coverage gaps and pause the affected source. + +### Start with cursor pull + +Call `createPerpsEventSubscription` directly, without a destination: + +```json +{ "name": "My account changes", "events": ["order", "fill"] } +``` + +Keep `subscription.id` and `cursor` from the result. Then call `getPerpsEvents`: + +```json +{ "subscriptionId": "", "cursor": "" } +``` + +A new subscription can have `baselineStatus: "pending"`. Continue from each returned cursor until the labelled initial snapshot is ready. Pending does not mean an empty, healthy account. Snapshot and health records always pass financial filters; earlier historical fills are not imported as new activity. + +Save the returned cursor after processing a page. If `hasMore` is true, continue with that cursor. Dedupe by `eventId`; retries are nondestructive but delivery is at least once. Keep sequence values as decimal strings and cursors opaque. A cursor belongs to its account, subscription and filter history. + +When `truncated` is true, report the `gap`, refresh current account state and use `earliestCursor` to continue from retained history. Do not claim the missing interval was empty. Current retention, subscription limits and supported filter fields are in the event catalogue and tool input schemas. + +### Change or stop a subscription + +Use `updatePerpsEventSubscription` with an `id` and `patch`. For example, `{"id":"","patch":{"enabled":false}}` pauses it; `enabled: true` resumes a paused subscription. A retention-related resume preserves the still-retained backlog and requests a fresh baseline. A terminated subscription cannot be reopened. + +Filter changes apply only after the returned `filterBoundary`. Older backlog keeps its original selection, including when read with an older valid cursor. Check the schema before combining filters: not every financial kind has an order or coin identity. To stop permanently, call `deletePerpsEventSubscription` with the `id`. + +Native tools cannot edit a protocol-managed subscription. Clients implementing MCP Events use `events/list`, `events/subscribe`, `events/poll` and `events/unsubscribe` for the same named stream. Other clients should use the native pull flow above. + +### Push to a receiver + +Reuse an active destination from `listWebhookDestinations`, then pass its `destinationId` when creating a subscription. [Webhook registration and signature verification](/predictions-mcp/events#register-a-webhook-destination) are shared with Predictions. Call destination tools directly, never through `bash`, because their arguments or results can contain secrets. + +Within one subscription, ordinary webhook delivery follows account recording sequence, not a guaranteed venue-wide chronology. Verify the raw-body Standard Webhooks signature before accepting it and dedupe by `eventId`. Perps pauses without advancing the cursor when a receiver rejects an oversized event. Unlike Predictions, it does not skip that event. Fix or replace the receiver before resuming. + +[Claude routines](/connect/claude#push-events-into-claude-code-routine) and [Grok Bot routines](/connect/grok-bot) reuse the same destination credentials and share a fire allowance across both products. A batch contains one product and one subscription; preserve its `source`, `version`, `more` and each event cursor. Receiver tests are optional and can start paid work. A notification is never permission to trade. + +Destinations are shared. Rename only the label with `updateWebhookDestination` and the current version from the list. URLs and destination kinds are immutable; register a replacement and retarget instead. Delete with `deleteWebhookDestination` only after checking attachments across Perps and Predictions. Do not disable another product's subscriptions to make room without the user's choice. + +Native event calls are metered; protocol calls and event delivery are not charged per event. Receiver or routine usage can cost extra. Admission and delivery limits are independent of trading authority. If creation returns `PERPS_EVENTS_NOT_ENABLED` or `PERPS_EVENTS_CAPACITY_EXHAUSTED`, do not loop requests or claim a subscription was created. + +Replay calls update activity and can close an invalid wallet binding, so clients may show a destructive annotation even though they move no money. See the [native tool reference](/perps-mcp/tools) for the emitted annotations. + ## Market radar `fetchHyperliquidMarketRadar` accepts an optional `limit` (its input schema gives the range) and an optional `dex`, such as `{"dex":"xyz"}`. Omit `dex` for canonical Hyperliquid. @@ -81,3 +129,5 @@ Call the native `getHyperliquidPrice` tool with: ``` Expected: JSON with the live BTC perpetual price. Or ask "BTC perps price" and check that the assistant calls `getHyperliquidPrice` instead of answering from memory. + +To verify account events without trading, ask: "Create a pull subscription for my order and fill changes, save its cursor, and read until its initial snapshot is ready. Report any coverage gaps. Do not place an order or test a paid routine." Check that the assistant uses `createPerpsEventSubscription` and `getPerpsEvents`, receives snapshot or health records, and saves the new cursor. An idle account need not emit a financial event. End the test subscription when you no longer need it. diff --git a/docs/perps-mcp/tools.mdx b/docs/perps-mcp/tools.mdx index c73f9469..e91e67ec 100644 --- a/docs/perps-mcp/tools.mdx +++ b/docs/perps-mcp/tools.mdx @@ -6,20 +6,27 @@ pageType: reference {/* Generated from tools/docs/venue-tools.json by tools/docs/venue-tools.mjs. Edit the catalog, then run `node tools/docs/venue-tools.mjs`. */} -Perps MCP at `https://askgina.ai/ai/perps/mcp` publishes each tool below as a native MCP tool beside `bash`. Native tools add no authority, because `bash` can already call the host tools behind them. They let your client show and gate each action by its own annotation instead of treating one `bash` call as a single risk. +Perps MCP at `https://askgina.ai/ai/perps/mcp` publishes each tool below as a native MCP tool beside `bash`. They use the same authenticated account, and your client can show and gate each action by its own annotations. Call native tools directly. Credential-bearing destination calls must not be wrapped in `bash`. Annotations are the server's own declaration. A client can use them to decide when to ask you before a call. They are hints, not enforcement, so keep approving every money-moving action yourself. Run `tools/list` on your connection to see what your deployment advertises. ## Annotation classes -| Class | `readOnlyHint` | `destructiveHint` | `idempotentHint` | `openWorldHint` | -| ----------------------- | -------------- | ----------------- | ---------------- | --------------- | -| Read, external provider | true | false | true | true | -| Read, Gina account | true | false | true | false | -| Execute | false | true | false | true | -| Sandbox | false | true | false | true | -| Render | true | false | not set | false | -| Render, may fetch | true | false | not set | true | +| Class | `readOnlyHint` | `destructiveHint` | `idempotentHint` | `openWorldHint` | +| ------------------------------ | -------------- | ----------------- | ---------------- | --------------- | +| Read, external provider | true | false | true | true | +| Read, Gina account | true | false | true | false | +| Execute | false | true | false | true | +| Start account observation | false | false | false | true | +| Change account observation | false | true | false | true | +| Account replay and lifecycle | false | true | true | true | +| Rename a destination | false | false | false | false | +| Register a webhook destination | false | true | not set | true | +| Change a webhook destination | false | true | not set | false | +| Test a webhook destination | false | false | not set | true | +| Sandbox | false | true | false | true | +| Render | true | false | not set | false | +| Render, may fetch | true | false | not set | true | ## Read, external provider @@ -47,9 +54,11 @@ Reads live data from a market, blockchain or other provider. It changes nothing Reads only state Gina stores for your account. It calls no outside provider and can be repeated. -| Tool | Use it for | -| --------------------- | -------------------------- | -| `getAccountAddresses` | Your Gina wallet addresses | +| Tool | Use it for | +| ----------------------------- | --------------------------------------------------------------------------- | +| `getAccountAddresses` | Your Gina wallet addresses | +| `listPerpsEventSubscriptions` | Your Perps subscriptions, filters and lifecycle status | +| `listWebhookDestinations` | Shared destinations and attachment counts, without receiver URLs or secrets | ## Execute @@ -68,6 +77,65 @@ Places, changes, cancels or settles an order, trade or fund movement. It acts at | `fundHIP3Dex` | Move USDC collateral into a HIP-3 DEX | | `returnHIP3DexFunds` | Return USDC collateral from a HIP-3 DEX | +## Start account observation + +Creates a linked-account event subscription and requests collection after wallet and credential checks. It moves no funds and does not grant trading permission. + +| Tool | Use it for | +| ------------------------------ | ------------------------------------------------------------------------------------------------------ | +| `createPerpsEventSubscription` | Observe linked-wallet account changes with a labelled baseline, cursor replay and optional destination | + +## Change account observation + +Changes a Perps subscription's filters, destination or lifecycle after external wallet and credential checks. It can replace delivery configuration or close an invalid binding, but moves no funds. + +| Tool | Use it for | +| ------------------------------ | ------------------------------------------------------------------------------ | +| `updatePerpsEventSubscription` | Rename, change future filters, retarget, pause or resume a native subscription | + +## Account replay and lifecycle + +Reads retained Perps events and updates activity, or permanently ends a subscription. Wallet and credential checks can close an invalid binding. These calls move no funds; replay is nondestructive even though its lifecycle effects require a destructive annotation. + +| Tool | Use it for | +| ------------------------------ | ------------------------------------------------------------------------------------------------------------- | +| `deletePerpsEventSubscription` | Permanently end a native subscription without moving funds | +| `getPerpsEvents` | Replay retained account events with an opaque cursor, explicit gaps and mandatory snapshot and health records | + +## Rename a destination + +Changes only a destination's label using its current version. It does not change the receiver URL, kind or credential and sends no request. + +| Tool | Use it for | +| -------------------------- | ----------------------------------------------------------------- | +| `updateWebhookDestination` | Change a destination label using the version returned by the list | + +## Register a webhook destination + +Registers a webhook or routine destination shared by Perps and Predictions. Only webhooks can return a generated signing secret once. Routines require their own credentials. It changes only the destination Gina stores for your account and moves no funds. It is marked destructive so your client asks you first, and a secret it passes or returns appears in your client's transcript. + +| Tool | Use it for | +| -------------------------- | ----------------------------------------------------------------------------------------------------- | +| `createWebhookDestination` | Register a shared webhook or routine destination; only webhooks can return a generated signing secret | + +## Change a webhook destination + +Replaces a destination's signing secret or routine credential, disables it, or deletes an unattached destination. It moves no funds and is marked destructive so your client asks you first. Disabling and deletion cannot be undone; attachments across Perps and Predictions prevent deletion. + +| Tool | Use it for | +| -------------------------------- | --------------------------------------------------------------------------------------------------- | +| `deleteWebhookDestination` | Delete an unattached destination with its current version; cross-product attachments block deletion | +| `rotateWebhookDestinationSecret` | Replace a webhook signing secret or routine credential using the destination's rotation policy | +| `disableWebhookDestination` | Disable a shared destination and pause subscriptions that use it | + +## Test a webhook destination + +Sends one optional test event to a registered destination and records the result. It can start a real automation or routine session and use the receiver's quota or paid usage, so it is not a read. + +| Tool | Use it for | +| ---------------------- | -------------------------------------------------------------------------------------- | +| `sendWebhookTestEvent` | Send an optional receiver test; it can start a real automation or paid routine session | + ## Sandbox Runs commands in a sandbox that can call every host tool the venue allows, including the execute class, so it carries the strictest class of the tools it can reach. diff --git a/docs/predictions-mcp/events.mdx b/docs/predictions-mcp/events.mdx index d222640e..acd0942e 100644 --- a/docs/predictions-mcp/events.mdx +++ b/docs/predictions-mcp/events.mdx @@ -107,6 +107,8 @@ If your host retries `createWebhookDestination` and a second destination appears For `kind: "webhook"`, replace a signing secret with `rotateWebhookDestinationSecret`, passing the `destinationId` and an optional new `secret`. It works on active destinations only and returns a generated secret once if you omit `secret`. A receiver that supplies its own secret needs its replacement value. To end a destination, call `disableWebhookDestination` with the `destinationId`. +Destinations are shared with [Perps account events](/perps-mcp/features#account-events). Use `updateWebhookDestination` with the current version from the list to change only a label. A receiver URL or kind cannot be edited; register a replacement and retarget its subscriptions. `deleteWebhookDestination` requires the current version and no remaining Perps or Predictions attachments. Check both products before disabling or deleting a shared destination. + The secret passes through your client's transcript on this path either way: you pass it in as `secret`, or Ask Gina returns it once in the result. Treat that transcript as holding a credential for this destination. Create, rotate and disable are marked destructive, so hosts ask you to confirm each call before it runs. `sendWebhookTestEvent` is not destructive, but it reaches your receiver. ### On the settings page diff --git a/docs/predictions-mcp/tools.mdx b/docs/predictions-mcp/tools.mdx index db0664fc..2937135a 100644 --- a/docs/predictions-mcp/tools.mdx +++ b/docs/predictions-mcp/tools.mdx @@ -6,7 +6,7 @@ pageType: reference {/* Generated from tools/docs/venue-tools.json by tools/docs/venue-tools.mjs. Edit the catalog, then run `node tools/docs/venue-tools.mjs`. */} -Predictions MCP at `https://askgina.ai/ai/predictions/mcp` publishes each tool below as a native MCP tool beside `bash`. Native tools add no authority, because `bash` can already call the host tools behind them. They let your client show and gate each action by its own annotation instead of treating one `bash` call as a single risk. +Predictions MCP at `https://askgina.ai/ai/predictions/mcp` publishes each tool below as a native MCP tool beside `bash`. They use the same authenticated account, and your client can show and gate each action by its own annotations. Call native tools directly. Credential-bearing destination calls must not be wrapped in `bash`. Annotations are the server's own declaration. A client can use them to decide when to ask you before a call. They are hints, not enforcement, so keep approving every money-moving action yourself. Run `tools/list` on your connection to see what your deployment advertises. @@ -20,6 +20,7 @@ Annotations are the server's own declaration. A client can use them to decide wh | Change a schedule | false | false | false | false | | Change an event subscription | false | false | false | false | | Delete an event subscription | false | true | false | false | +| Rename a destination | false | false | false | false | | Register a webhook destination | false | true | not set | true | | Change a webhook destination | false | true | not set | false | | Test a webhook destination | false | false | not set | true | @@ -98,9 +99,17 @@ Deletes a prediction event subscription so it stops delivering. It moves no fund | ----------------------------------- | ---------------------------------------------------------- | | `deletePredictionEventSubscription` | Delete a subscription; it sends one final terminated event | +## Rename a destination + +Changes only a destination's label using its current version. It does not change the receiver URL, kind or credential and sends no request. + +| Tool | Use it for | +| -------------------------- | ----------------------------------------------------------- | +| `updateWebhookDestination` | Change only the destination label using its current version | + ## Register a webhook destination -Registers a webhook or routine destination for prediction events. Only webhooks can return a generated signing secret once. Routines require their own credentials. It changes only the destination Gina stores for your account and moves no funds. It is marked destructive so your client asks you first, and a secret it passes or returns appears in your client's transcript. +Registers a webhook or routine destination shared by Perps and Predictions. Only webhooks can return a generated signing secret once. Routines require their own credentials. It changes only the destination Gina stores for your account and moves no funds. It is marked destructive so your client asks you first, and a secret it passes or returns appears in your client's transcript. | Tool | Use it for | | -------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------- | @@ -108,10 +117,11 @@ Registers a webhook or routine destination for prediction events. Only webhooks ## Change a webhook destination -Replaces a destination's signing secret or routine credential, or disables it. It moves no funds and is marked destructive so your client asks you first. Disabling cannot be undone. +Replaces a destination's signing secret or routine credential, disables it, or deletes an unattached destination. It moves no funds and is marked destructive so your client asks you first. Disabling and deletion cannot be undone; attachments across Perps and Predictions prevent deletion. | Tool | Use it for | | -------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `deleteWebhookDestination` | Delete an unattached destination with its current version; Perps and Predictions attachments block deletion | | `rotateWebhookDestinationSecret` | Replace a webhook signing secret with 24-hour overlap, or supply a new routine credential with no overlap. A generated webhook secret is returned once | | `disableWebhookDestination` | Disable a destination for good and pause the subscriptions that use it | diff --git a/tools/docs/venue-tools.json b/tools/docs/venue-tools.json index ebf0a68c..f026551b 100644 --- a/tools/docs/venue-tools.json +++ b/tools/docs/venue-tools.json @@ -61,6 +61,46 @@ }, "meaning": "Deletes a prediction event subscription so it stops delivering. It moves no funds, and it is marked destructive because it cannot be undone." }, + "create-account-subscription": { + "title": "Start account observation", + "hints": { + "readOnlyHint": false, + "destructiveHint": false, + "idempotentHint": false, + "openWorldHint": true + }, + "meaning": "Creates a linked-account event subscription and requests collection after wallet and credential checks. It moves no funds and does not grant trading permission." + }, + "change-account-subscription": { + "title": "Change account observation", + "hints": { + "readOnlyHint": false, + "destructiveHint": true, + "idempotentHint": false, + "openWorldHint": true + }, + "meaning": "Changes a Perps subscription's filters, destination or lifecycle after external wallet and credential checks. It can replace delivery configuration or close an invalid binding, but moves no funds." + }, + "account-subscription-lifecycle": { + "title": "Account replay and lifecycle", + "hints": { + "readOnlyHint": false, + "destructiveHint": true, + "idempotentHint": true, + "openWorldHint": true + }, + "meaning": "Reads retained Perps events and updates activity, or permanently ends a subscription. Wallet and credential checks can close an invalid binding. These calls move no funds; replay is nondestructive even though its lifecycle effects require a destructive annotation." + }, + "update-destination-label": { + "title": "Rename a destination", + "hints": { + "readOnlyHint": false, + "destructiveHint": false, + "idempotentHint": false, + "openWorldHint": false + }, + "meaning": "Changes only a destination's label using its current version. It does not change the receiver URL, kind or credential and sends no request." + }, "register-destination": { "title": "Register a webhook destination", "hints": { @@ -68,7 +108,7 @@ "destructiveHint": true, "openWorldHint": true }, - "meaning": "Registers a webhook or routine destination for prediction events. Only webhooks can return a generated signing secret once. Routines require their own credentials. It changes only the destination Gina stores for your account and moves no funds. It is marked destructive so your client asks you first, and a secret it passes or returns appears in your client's transcript." + "meaning": "Registers a webhook or routine destination shared by Perps and Predictions. Only webhooks can return a generated signing secret once. Routines require their own credentials. It changes only the destination Gina stores for your account and moves no funds. It is marked destructive so your client asks you first, and a secret it passes or returns appears in your client's transcript." }, "change-destination": { "title": "Change a webhook destination", @@ -77,7 +117,7 @@ "destructiveHint": true, "openWorldHint": false }, - "meaning": "Replaces a destination's signing secret or routine credential, or disables it. It moves no funds and is marked destructive so your client asks you first. Disabling cannot be undone." + "meaning": "Replaces a destination's signing secret or routine credential, disables it, or deletes an unattached destination. It moves no funds and is marked destructive so your client asks you first. Disabling and deletion cannot be undone; attachments across Perps and Predictions prevent deletion." }, "test-destination": { "title": "Test a webhook destination", @@ -222,6 +262,66 @@ "class": "read-external", "purpose": "Rank markets by activity and compare retained samples" }, + { + "name": "createPerpsEventSubscription", + "class": "create-account-subscription", + "purpose": "Observe linked-wallet account changes with a labelled baseline, cursor replay and optional destination" + }, + { + "name": "listPerpsEventSubscriptions", + "class": "read-local", + "purpose": "Your Perps subscriptions, filters and lifecycle status" + }, + { + "name": "updatePerpsEventSubscription", + "class": "change-account-subscription", + "purpose": "Rename, change future filters, retarget, pause or resume a native subscription" + }, + { + "name": "deletePerpsEventSubscription", + "class": "account-subscription-lifecycle", + "purpose": "Permanently end a native subscription without moving funds" + }, + { + "name": "getPerpsEvents", + "class": "account-subscription-lifecycle", + "purpose": "Replay retained account events with an opaque cursor, explicit gaps and mandatory snapshot and health records" + }, + { + "name": "listWebhookDestinations", + "class": "read-local", + "purpose": "Shared destinations and attachment counts, without receiver URLs or secrets" + }, + { + "name": "createWebhookDestination", + "class": "register-destination", + "purpose": "Register a shared webhook or routine destination; only webhooks can return a generated signing secret" + }, + { + "name": "updateWebhookDestination", + "class": "update-destination-label", + "purpose": "Change a destination label using the version returned by the list" + }, + { + "name": "deleteWebhookDestination", + "class": "change-destination", + "purpose": "Delete an unattached destination with its current version; cross-product attachments block deletion" + }, + { + "name": "rotateWebhookDestinationSecret", + "class": "change-destination", + "purpose": "Replace a webhook signing secret or routine credential using the destination's rotation policy" + }, + { + "name": "disableWebhookDestination", + "class": "change-destination", + "purpose": "Disable a shared destination and pause subscriptions that use it" + }, + { + "name": "sendWebhookTestEvent", + "class": "test-destination", + "purpose": "Send an optional receiver test; it can start a real automation or paid routine session" + }, { "name": "placeHyperliquidOrder", "class": "execute", @@ -341,6 +441,16 @@ "class": "read-local", "purpose": "Your registered webhook destinations, without URLs or secrets" }, + { + "name": "updateWebhookDestination", + "class": "update-destination-label", + "purpose": "Change only the destination label using its current version" + }, + { + "name": "deleteWebhookDestination", + "class": "change-destination", + "purpose": "Delete an unattached destination with its current version; Perps and Predictions attachments block deletion" + }, { "name": "createWebhookDestination", "class": "register-destination", diff --git a/tools/docs/venue-tools.mjs b/tools/docs/venue-tools.mjs index c16564bb..779160da 100644 --- a/tools/docs/venue-tools.mjs +++ b/tools/docs/venue-tools.mjs @@ -119,7 +119,7 @@ pageType: reference {/* Generated from ${CATALOG_FILE} by tools/docs/venue-tools.mjs. Edit the catalog, then run \`node tools/docs/venue-tools.mjs\`. */} -${entry.title} MCP at ${endpoint} publishes each tool below as a native MCP tool beside \`bash\`. Native tools add no authority, because \`bash\` can already call the host tools behind them. They let your client show and gate each action by its own annotation instead of treating one \`bash\` call as a single risk. +${entry.title} MCP at ${endpoint} publishes each tool below as a native MCP tool beside \`bash\`. They use the same authenticated account, and your client can show and gate each action by its own annotations. Call native tools directly. Credential-bearing destination calls must not be wrapped in \`bash\`. Annotations are the server's own declaration. A client can use them to decide when to ask you before a call. They are hints, not enforcement, so keep approving every money-moving action yourself. Run \`tools/list\` on your connection to see what your deployment advertises. `, From daa79db9b84e9ac2c038a8663d4d3900a7ddf8e7 Mon Sep 17 00:00:00 2001 From: Eric Juta Date: Mon, 26 Oct 2026 22:34:08 +0000 Subject: [PATCH 2/3] docs(events): clarify shared destination cleanup --- ai_docs/write-plugin-tool-justifications.md | 4 ++-- docs/perps-mcp/features.mdx | 2 +- docs/perps-mcp/tools.mdx | 12 ++++++------ docs/predictions-mcp/events.mdx | 2 +- docs/predictions-mcp/tools.mdx | 4 ++-- tools/docs/venue-tools.json | 6 +++--- 6 files changed, 15 insertions(+), 15 deletions(-) diff --git a/ai_docs/write-plugin-tool-justifications.md b/ai_docs/write-plugin-tool-justifications.md index 73afccb6..e1a3222d 100644 --- a/ai_docs/write-plugin-tool-justifications.md +++ b/ai_docs/write-plugin-tool-justifications.md @@ -109,7 +109,7 @@ Only `createHyperliquidTable`, `executeSqlQuery` and `captureAnalysisDataset` ar | `listWebhookDestinations` | true, false, false | Lists shared destination labels and attachment counts without receiver URLs or secrets. It reads stored account state only. | | `createWebhookDestination` | false, true, true | Registers a receiver after external URL checks. Credentials can appear in the host transcript, so it requires confirmation. It sends no event and moves no funds. | | `updateWebhookDestination` | false, false, false | Renames a destination using its current version. It cannot change the URL, kind or credentials and sends no request. | -| `deleteWebhookDestination` | false, true, false | Permanently deletes an unattached destination. Any Perps or Predictions attachment prevents deletion. It sends no request and moves no funds. | +| `deleteWebhookDestination` | false, true, false | Permanently deletes a disabled, unattached destination. Any Perps or Predictions attachment prevents deletion. It sends no request and moves no funds. | | `rotateWebhookDestinationSecret` | false, true, false | Replaces a signing secret or routine credential under the destination's rotation policy. It changes receiver access, so it requires confirmation. | | `disableWebhookDestination` | false, true, false | Disables a shared destination and pauses attached subscriptions across both products. This stops delivery and cannot be undone. | | `sendWebhookTestEvent` | false, false, true | Sends an optional test to a receiver and records its outcome. It can start a real automation or paid routine session, so it is not a read. | @@ -144,7 +144,7 @@ A `splitMergePredictionPosition` split preview returns a typed `next` suggestion | `listScheduledPrompts` | true, false, false | Lists your scheduled prompts from Gina account state. It changes nothing and calls no outside provider, so it is read only and closed world. | | `searchPredictionMarkets` | true, false, true | Searches Polymarket markets. It places no order and changes nothing, so it is read only and open world. | | `updateWebhookDestination` | false, false, false | Renames a shared destination using its current version. It cannot change the URL, kind or credentials and sends no request. | -| `deleteWebhookDestination` | false, true, false | Permanently deletes an unattached destination. Perps and Predictions attachments prevent deletion. It sends no request and moves no funds. | +| `deleteWebhookDestination` | false, true, false | Permanently deletes a disabled, unattached destination. Perps and Predictions attachments prevent deletion. It sends no request and moves no funds. | | `getExpiringMarkets` | true, false, true | Reads Polymarket markets that end soon. It changes nothing, so it is read only and open world. | | `getPredictionSportsEvents` | true, false, true | Reads Polymarket sports events and their markets by league, team or date. It places no order and changes nothing, so it is read only and open world. | | `getPredictionSubjectMarkets` | true, false, true | Reads Polymarket markets about one subject, such as a person, company or asset. It changes nothing, so it is read only and open world. | diff --git a/docs/perps-mcp/features.mdx b/docs/perps-mcp/features.mdx index d8744980..f9c42b1e 100644 --- a/docs/perps-mcp/features.mdx +++ b/docs/perps-mcp/features.mdx @@ -82,7 +82,7 @@ Within one subscription, ordinary webhook delivery follows account recording seq [Claude routines](/connect/claude#push-events-into-claude-code-routine) and [Grok Bot routines](/connect/grok-bot) reuse the same destination credentials and share a fire allowance across both products. A batch contains one product and one subscription; preserve its `source`, `version`, `more` and each event cursor. Receiver tests are optional and can start paid work. A notification is never permission to trade. -Destinations are shared. Rename only the label with `updateWebhookDestination` and the current version from the list. URLs and destination kinds are immutable; register a replacement and retarget instead. Delete with `deleteWebhookDestination` only after checking attachments across Perps and Predictions. Do not disable another product's subscriptions to make room without the user's choice. +Destinations are shared. Rename only the label with `updateWebhookDestination` and the current version from the list. URLs and destination kinds are immutable; register a replacement and retarget instead. Before deleting, check attachments across Perps and Predictions. Once the destination is unattached, call `disableWebhookDestination`, list it again, then pass its new version to `deleteWebhookDestination`. Do not disable another product's subscriptions to make room without the user's choice. Native event calls are metered; protocol calls and event delivery are not charged per event. Receiver or routine usage can cost extra. Admission and delivery limits are independent of trading authority. If creation returns `PERPS_EVENTS_NOT_ENABLED` or `PERPS_EVENTS_CAPACITY_EXHAUSTED`, do not loop requests or claim a subscription was created. diff --git a/docs/perps-mcp/tools.mdx b/docs/perps-mcp/tools.mdx index e91e67ec..7a8c6ad2 100644 --- a/docs/perps-mcp/tools.mdx +++ b/docs/perps-mcp/tools.mdx @@ -120,13 +120,13 @@ Registers a webhook or routine destination shared by Perps and Predictions. Only ## Change a webhook destination -Replaces a destination's signing secret or routine credential, disables it, or deletes an unattached destination. It moves no funds and is marked destructive so your client asks you first. Disabling and deletion cannot be undone; attachments across Perps and Predictions prevent deletion. +Replaces a destination's signing secret or routine credential, disables it, or deletes a disabled, unattached destination. It moves no funds and is marked destructive so your client asks you first. Disabling and deletion cannot be undone. Check both products for attachments before disabling, then list the destination again to get its current version before deletion. -| Tool | Use it for | -| -------------------------------- | --------------------------------------------------------------------------------------------------- | -| `deleteWebhookDestination` | Delete an unattached destination with its current version; cross-product attachments block deletion | -| `rotateWebhookDestinationSecret` | Replace a webhook signing secret or routine credential using the destination's rotation policy | -| `disableWebhookDestination` | Disable a shared destination and pause subscriptions that use it | +| Tool | Use it for | +| -------------------------------- | ---------------------------------------------------------------------------------------------- | +| `deleteWebhookDestination` | Delete a disabled, unattached destination using the version returned after disabling | +| `rotateWebhookDestinationSecret` | Replace a webhook signing secret or routine credential using the destination's rotation policy | +| `disableWebhookDestination` | Disable a shared destination and pause subscriptions that use it | ## Test a webhook destination diff --git a/docs/predictions-mcp/events.mdx b/docs/predictions-mcp/events.mdx index acd0942e..59c89ce6 100644 --- a/docs/predictions-mcp/events.mdx +++ b/docs/predictions-mcp/events.mdx @@ -107,7 +107,7 @@ If your host retries `createWebhookDestination` and a second destination appears For `kind: "webhook"`, replace a signing secret with `rotateWebhookDestinationSecret`, passing the `destinationId` and an optional new `secret`. It works on active destinations only and returns a generated secret once if you omit `secret`. A receiver that supplies its own secret needs its replacement value. To end a destination, call `disableWebhookDestination` with the `destinationId`. -Destinations are shared with [Perps account events](/perps-mcp/features#account-events). Use `updateWebhookDestination` with the current version from the list to change only a label. A receiver URL or kind cannot be edited; register a replacement and retarget its subscriptions. `deleteWebhookDestination` requires the current version and no remaining Perps or Predictions attachments. Check both products before disabling or deleting a shared destination. +Destinations are shared with [Perps account events](/perps-mcp/features#account-events). Use `updateWebhookDestination` with the current version from the list to change only a label. A receiver URL or kind cannot be edited; register a replacement and retarget its subscriptions. `deleteWebhookDestination` requires a disabled destination, its current version and no remaining Perps or Predictions attachments. Check both products before disabling an unattached destination, then list it again to obtain the new version for deletion. The secret passes through your client's transcript on this path either way: you pass it in as `secret`, or Ask Gina returns it once in the result. Treat that transcript as holding a credential for this destination. Create, rotate and disable are marked destructive, so hosts ask you to confirm each call before it runs. `sendWebhookTestEvent` is not destructive, but it reaches your receiver. diff --git a/docs/predictions-mcp/tools.mdx b/docs/predictions-mcp/tools.mdx index 2937135a..d9a2aa0f 100644 --- a/docs/predictions-mcp/tools.mdx +++ b/docs/predictions-mcp/tools.mdx @@ -117,11 +117,11 @@ Registers a webhook or routine destination shared by Perps and Predictions. Only ## Change a webhook destination -Replaces a destination's signing secret or routine credential, disables it, or deletes an unattached destination. It moves no funds and is marked destructive so your client asks you first. Disabling and deletion cannot be undone; attachments across Perps and Predictions prevent deletion. +Replaces a destination's signing secret or routine credential, disables it, or deletes a disabled, unattached destination. It moves no funds and is marked destructive so your client asks you first. Disabling and deletion cannot be undone. Check both products for attachments before disabling, then list the destination again to get its current version before deletion. | Tool | Use it for | | -------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `deleteWebhookDestination` | Delete an unattached destination with its current version; Perps and Predictions attachments block deletion | +| `deleteWebhookDestination` | Delete a disabled, unattached destination using the version returned after disabling | | `rotateWebhookDestinationSecret` | Replace a webhook signing secret with 24-hour overlap, or supply a new routine credential with no overlap. A generated webhook secret is returned once | | `disableWebhookDestination` | Disable a destination for good and pause the subscriptions that use it | diff --git a/tools/docs/venue-tools.json b/tools/docs/venue-tools.json index f026551b..5e7f7edc 100644 --- a/tools/docs/venue-tools.json +++ b/tools/docs/venue-tools.json @@ -117,7 +117,7 @@ "destructiveHint": true, "openWorldHint": false }, - "meaning": "Replaces a destination's signing secret or routine credential, disables it, or deletes an unattached destination. It moves no funds and is marked destructive so your client asks you first. Disabling and deletion cannot be undone; attachments across Perps and Predictions prevent deletion." + "meaning": "Replaces a destination's signing secret or routine credential, disables it, or deletes a disabled, unattached destination. It moves no funds and is marked destructive so your client asks you first. Disabling and deletion cannot be undone. Check both products for attachments before disabling, then list the destination again to get its current version before deletion." }, "test-destination": { "title": "Test a webhook destination", @@ -305,7 +305,7 @@ { "name": "deleteWebhookDestination", "class": "change-destination", - "purpose": "Delete an unattached destination with its current version; cross-product attachments block deletion" + "purpose": "Delete a disabled, unattached destination using the version returned after disabling" }, { "name": "rotateWebhookDestinationSecret", @@ -449,7 +449,7 @@ { "name": "deleteWebhookDestination", "class": "change-destination", - "purpose": "Delete an unattached destination with its current version; Perps and Predictions attachments block deletion" + "purpose": "Delete a disabled, unattached destination using the version returned after disabling" }, { "name": "createWebhookDestination", From 26d5ab05f283fee3e0c6247cd2ac4fb6437599d9 Mon Sep 17 00:00:00 2001 From: Eric Juta Date: Tue, 27 Oct 2026 05:30:03 +0000 Subject: [PATCH 3/3] docs(perps): align annotations and terminal delivery contracts --- ai_docs/write-plugin-tool-justifications.md | 8 ++++---- docs/perps-mcp/features.mdx | 8 ++++---- docs/perps-mcp/tools.mdx | 8 ++++---- docs/predictions-mcp/tools.mdx | 18 +++++------------- tools/docs/venue-tools.json | 7 +++++-- 5 files changed, 22 insertions(+), 27 deletions(-) diff --git a/ai_docs/write-plugin-tool-justifications.md b/ai_docs/write-plugin-tool-justifications.md index e1a3222d..62209f35 100644 --- a/ai_docs/write-plugin-tool-justifications.md +++ b/ai_docs/write-plugin-tool-justifications.md @@ -104,12 +104,12 @@ Only `createHyperliquidTable`, `executeSqlQuery` and `captureAnalysisDataset` ar | `createPerpsEventSubscription` | false, false, true | Starts linked-account observation after wallet checks. It stores a subscription and requests collection, but places no orders and moves no funds. | | `listPerpsEventSubscriptions` | true, false, false | Lists stored Perps subscriptions, filters and lifecycle status. It calls no outside provider and changes nothing. | | `updatePerpsEventSubscription` | false, true, true | Changes filters, delivery destination or lifecycle after wallet checks. It can replace delivery settings or end an invalid binding, but moves no funds. | -| `deletePerpsEventSubscription` | false, true, true | Permanently ends a subscription after wallet checks. It stops account observation and delivery without moving funds. | +| `deletePerpsEventSubscription` | false, true, true | Ends this subscription's observation demand and future financial delivery after wallet checks. An eligible receiver may still get terminal health. No funds move. | | `getPerpsEvents` | false, true, true | Replays retained events and refreshes activity. External wallet checks can close an invalid binding, so it is not read only despite moving no funds. | | `listWebhookDestinations` | true, false, false | Lists shared destination labels and attachment counts without receiver URLs or secrets. It reads stored account state only. | | `createWebhookDestination` | false, true, true | Registers a receiver after external URL checks. Credentials can appear in the host transcript, so it requires confirmation. It sends no event and moves no funds. | | `updateWebhookDestination` | false, false, false | Renames a destination using its current version. It cannot change the URL, kind or credentials and sends no request. | -| `deleteWebhookDestination` | false, true, false | Permanently deletes a disabled, unattached destination. Any Perps or Predictions attachment prevents deletion. It sends no request and moves no funds. | +| `deleteWebhookDestination` | false, true, false | Permanently deletes a disabled destination with no active or paused Perps or Predictions attachments. It sends no request and moves no funds. | | `rotateWebhookDestinationSecret` | false, true, false | Replaces a signing secret or routine credential under the destination's rotation policy. It changes receiver access, so it requires confirmation. | | `disableWebhookDestination` | false, true, false | Disables a shared destination and pauses attached subscriptions across both products. This stops delivery and cannot be undone. | | `sendWebhookTestEvent` | false, false, true | Sends an optional test to a receiver and records its outcome. It can start a real automation or paid routine session, so it is not a read. | @@ -143,8 +143,8 @@ A `splitMergePredictionPosition` split preview returns a typed `next` suggestion | `getAccountAddresses` | true, false, false | Returns your Gina wallet addresses from stored account state. It calls no outside provider and changes nothing, so it is read only and closed world. | | `listScheduledPrompts` | true, false, false | Lists your scheduled prompts from Gina account state. It changes nothing and calls no outside provider, so it is read only and closed world. | | `searchPredictionMarkets` | true, false, true | Searches Polymarket markets. It places no order and changes nothing, so it is read only and open world. | -| `updateWebhookDestination` | false, false, false | Renames a shared destination using its current version. It cannot change the URL, kind or credentials and sends no request. | -| `deleteWebhookDestination` | false, true, false | Permanently deletes a disabled, unattached destination. Perps and Predictions attachments prevent deletion. It sends no request and moves no funds. | +| `updateWebhookDestination` | false, true, false | Renames a shared destination using its current version. Predictions marks this mutation destructive. It cannot change the URL, kind or credentials and sends no request. | +| `deleteWebhookDestination` | false, true, false | Permanently deletes a disabled destination with no active or paused Perps or Predictions attachments. It sends no request and moves no funds. | | `getExpiringMarkets` | true, false, true | Reads Polymarket markets that end soon. It changes nothing, so it is read only and open world. | | `getPredictionSportsEvents` | true, false, true | Reads Polymarket sports events and their markets by league, team or date. It places no order and changes nothing, so it is read only and open world. | | `getPredictionSubjectMarkets` | true, false, true | Reads Polymarket markets about one subject, such as a person, company or asset. It changes nothing, so it is read only and open world. | diff --git a/docs/perps-mcp/features.mdx b/docs/perps-mcp/features.mdx index f9c42b1e..660ad09f 100644 --- a/docs/perps-mcp/features.mdx +++ b/docs/perps-mcp/features.mdx @@ -64,15 +64,15 @@ A new subscription can have `baselineStatus: "pending"`. Continue from each retu Save the returned cursor after processing a page. If `hasMore` is true, continue with that cursor. Dedupe by `eventId`; retries are nondestructive but delivery is at least once. Keep sequence values as decimal strings and cursors opaque. A cursor belongs to its account, subscription and filter history. -When `truncated` is true, report the `gap`, refresh current account state and use `earliestCursor` to continue from retained history. Do not claim the missing interval was empty. Current retention, subscription limits and supported filter fields are in the event catalogue and tool input schemas. +When `truncated` is true, report the `gap`, refresh current account state and use `earliestCursor` to continue from retained history. Do not claim the missing interval was empty. Use `events/list` and `tools/list` for current retention, subscription limits, tool descriptions and input schemas. ### Change or stop a subscription Use `updatePerpsEventSubscription` with an `id` and `patch`. For example, `{"id":"","patch":{"enabled":false}}` pauses it; `enabled: true` resumes a paused subscription. A retention-related resume preserves the still-retained backlog and requests a fresh baseline. A terminated subscription cannot be reopened. -Filter changes apply only after the returned `filterBoundary`. Older backlog keeps its original selection, including when read with an older valid cursor. Check the schema before combining filters: not every financial kind has an order or coin identity. To stop permanently, call `deletePerpsEventSubscription` with the `id`. +Filter changes apply only after the returned `filterBoundary`. Older backlog keeps its original selection, including when read with an older valid cursor. Check the schema before combining filters: not every financial kind has an order or coin identity. To stop permanently, call `deletePerpsEventSubscription` with the `id`. This ends that subscription's observation demand and future financial delivery. A final health notification may still reach an eligible native receiver. -Native tools cannot edit a protocol-managed subscription. Clients implementing MCP Events use `events/list`, `events/subscribe`, `events/poll` and `events/unsubscribe` for the same named stream. Other clients should use the native pull flow above. +Native tools cannot edit a protocol-managed subscription. Clients implementing MCP Events use `events/list`, `events/subscribe`, `events/poll` and `events/unsubscribe` for the same named stream. Protocol expiry or unsubscribe disables its callback; do not expect a terminal webhook. Other clients should use the native pull flow above. ### Push to a receiver @@ -80,7 +80,7 @@ Reuse an active destination from `listWebhookDestinations`, then pass its `desti Within one subscription, ordinary webhook delivery follows account recording sequence, not a guaranteed venue-wide chronology. Verify the raw-body Standard Webhooks signature before accepting it and dedupe by `eventId`. Perps pauses without advancing the cursor when a receiver rejects an oversized event. Unlike Predictions, it does not skip that event. Fix or replace the receiver before resuming. -[Claude routines](/connect/claude#push-events-into-claude-code-routine) and [Grok Bot routines](/connect/grok-bot) reuse the same destination credentials and share a fire allowance across both products. A batch contains one product and one subscription; preserve its `source`, `version`, `more` and each event cursor. Receiver tests are optional and can start paid work. A notification is never permission to trade. +[Claude routines](/connect/claude#push-events-into-claude-code-routine) and [Grok Bot routines](/connect/grok-bot) reuse the same destination credentials and share a fire allowance across both products. Each batch contains one product and one subscription. Grok Bot receives an object with `source`, `version`, `notice`, `more` and `events`. Claude receives a prose notice followed by a JSON array, with any backlog warning in the notice. Preserve each event's cursor and the receiver's backlog indication. Receiver tests are optional and can start paid work. A notification is never permission to trade. Destinations are shared. Rename only the label with `updateWebhookDestination` and the current version from the list. URLs and destination kinds are immutable; register a replacement and retarget instead. Before deleting, check attachments across Perps and Predictions. Once the destination is unattached, call `disableWebhookDestination`, list it again, then pass its new version to `deleteWebhookDestination`. Do not disable another product's subscriptions to make room without the user's choice. diff --git a/docs/perps-mcp/tools.mdx b/docs/perps-mcp/tools.mdx index 7a8c6ad2..7c77ae43 100644 --- a/docs/perps-mcp/tools.mdx +++ b/docs/perps-mcp/tools.mdx @@ -21,9 +21,9 @@ Annotations are the server's own declaration. A client can use them to decide wh | Change account observation | false | true | false | true | | Account replay and lifecycle | false | true | true | true | | Rename a destination | false | false | false | false | -| Register a webhook destination | false | true | not set | true | -| Change a webhook destination | false | true | not set | false | -| Test a webhook destination | false | false | not set | true | +| Register a webhook destination | false | true | false | true | +| Change a webhook destination | false | true | false | false | +| Test a webhook destination | false | false | false | true | | Sandbox | false | true | false | true | | Render | true | false | not set | false | | Render, may fetch | true | false | not set | true | @@ -120,7 +120,7 @@ Registers a webhook or routine destination shared by Perps and Predictions. Only ## Change a webhook destination -Replaces a destination's signing secret or routine credential, disables it, or deletes a disabled, unattached destination. It moves no funds and is marked destructive so your client asks you first. Disabling and deletion cannot be undone. Check both products for attachments before disabling, then list the destination again to get its current version before deletion. +Renames a destination through Predictions, replaces its signing secret or routine credential, disables it, or deletes a disabled destination with no active or paused attachments. It moves no funds and is marked destructive so your client asks you first. Disabling and deletion cannot be undone. Check both products for attachments before disabling, then list the destination again to get its current version before deletion. | Tool | Use it for | | -------------------------------- | ---------------------------------------------------------------------------------------------- | diff --git a/docs/predictions-mcp/tools.mdx b/docs/predictions-mcp/tools.mdx index d9a2aa0f..16cc35d4 100644 --- a/docs/predictions-mcp/tools.mdx +++ b/docs/predictions-mcp/tools.mdx @@ -20,10 +20,9 @@ Annotations are the server's own declaration. A client can use them to decide wh | Change a schedule | false | false | false | false | | Change an event subscription | false | false | false | false | | Delete an event subscription | false | true | false | false | -| Rename a destination | false | false | false | false | -| Register a webhook destination | false | true | not set | true | -| Change a webhook destination | false | true | not set | false | -| Test a webhook destination | false | false | not set | true | +| Register a webhook destination | false | true | false | true | +| Change a webhook destination | false | true | false | false | +| Test a webhook destination | false | false | false | true | | Delete a schedule | false | true | false | false | | Sandbox | false | true | false | true | @@ -99,14 +98,6 @@ Deletes a prediction event subscription so it stops delivering. It moves no fund | ----------------------------------- | ---------------------------------------------------------- | | `deletePredictionEventSubscription` | Delete a subscription; it sends one final terminated event | -## Rename a destination - -Changes only a destination's label using its current version. It does not change the receiver URL, kind or credential and sends no request. - -| Tool | Use it for | -| -------------------------- | ----------------------------------------------------------- | -| `updateWebhookDestination` | Change only the destination label using its current version | - ## Register a webhook destination Registers a webhook or routine destination shared by Perps and Predictions. Only webhooks can return a generated signing secret once. Routines require their own credentials. It changes only the destination Gina stores for your account and moves no funds. It is marked destructive so your client asks you first, and a secret it passes or returns appears in your client's transcript. @@ -117,10 +108,11 @@ Registers a webhook or routine destination shared by Perps and Predictions. Only ## Change a webhook destination -Replaces a destination's signing secret or routine credential, disables it, or deletes a disabled, unattached destination. It moves no funds and is marked destructive so your client asks you first. Disabling and deletion cannot be undone. Check both products for attachments before disabling, then list the destination again to get its current version before deletion. +Renames a destination through Predictions, replaces its signing secret or routine credential, disables it, or deletes a disabled destination with no active or paused attachments. It moves no funds and is marked destructive so your client asks you first. Disabling and deletion cannot be undone. Check both products for attachments before disabling, then list the destination again to get its current version before deletion. | Tool | Use it for | | -------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `updateWebhookDestination` | Change only the destination label using its current version | | `deleteWebhookDestination` | Delete a disabled, unattached destination using the version returned after disabling | | `rotateWebhookDestinationSecret` | Replace a webhook signing secret with 24-hour overlap, or supply a new routine credential with no overlap. A generated webhook secret is returned once | | `disableWebhookDestination` | Disable a destination for good and pause the subscriptions that use it | diff --git a/tools/docs/venue-tools.json b/tools/docs/venue-tools.json index 5e7f7edc..6f88e79e 100644 --- a/tools/docs/venue-tools.json +++ b/tools/docs/venue-tools.json @@ -106,6 +106,7 @@ "hints": { "readOnlyHint": false, "destructiveHint": true, + "idempotentHint": false, "openWorldHint": true }, "meaning": "Registers a webhook or routine destination shared by Perps and Predictions. Only webhooks can return a generated signing secret once. Routines require their own credentials. It changes only the destination Gina stores for your account and moves no funds. It is marked destructive so your client asks you first, and a secret it passes or returns appears in your client's transcript." @@ -115,15 +116,17 @@ "hints": { "readOnlyHint": false, "destructiveHint": true, + "idempotentHint": false, "openWorldHint": false }, - "meaning": "Replaces a destination's signing secret or routine credential, disables it, or deletes a disabled, unattached destination. It moves no funds and is marked destructive so your client asks you first. Disabling and deletion cannot be undone. Check both products for attachments before disabling, then list the destination again to get its current version before deletion." + "meaning": "Renames a destination through Predictions, replaces its signing secret or routine credential, disables it, or deletes a disabled destination with no active or paused attachments. It moves no funds and is marked destructive so your client asks you first. Disabling and deletion cannot be undone. Check both products for attachments before disabling, then list the destination again to get its current version before deletion." }, "test-destination": { "title": "Test a webhook destination", "hints": { "readOnlyHint": false, "destructiveHint": false, + "idempotentHint": false, "openWorldHint": true }, "meaning": "Sends one optional test event to a registered destination and records the result. It can start a real automation or routine session and use the receiver's quota or paid usage, so it is not a read." @@ -443,7 +446,7 @@ }, { "name": "updateWebhookDestination", - "class": "update-destination-label", + "class": "change-destination", "purpose": "Change only the destination label using its current version" }, {