Skip to main content
Glama

cancel_perp_order

Destructive

Cancel a resting perp order on its venue (non-custodial).

jurisdiction: cancel is geo-gated too -- see place_perp_order.

idempotency_key (optional): a client-generated UUID. Retrying with the same key + same args replays the original result instead of re-cancelling the order. Reuse the SAME key across the build call and its signed_transaction completion call -- see place_perp_order; the two legs dedupe independently, so this never raises IDEMPOTENCY_CONFLICT.

signed_transaction / verify (two-phase execution): see place_perp_order. A cancel moves no position, so confirming the signature landed IS the verification -- no state re-read is declared.

venue_action (optional, completion leg only): see place_perp_order -- pass back the build leg's extra['venue_action'] (e.g. Jupiter's cancel-limit-order) so the relay route is the venue's own declared one instead of one inferred from the signed bytes.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
ipNo
venueNo
verifyNo
order_idYes
caller_idNo
jurisdictionNo
venue_actionNo
wallet_addressYes
idempotency_keyNo
acknowledge_tier_bNo
signed_transactionNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedInput schema / properties / venue_action
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null
      +}
  2. Changed2 schema fields changed
    • addedInput schema / properties / ip
      Added value: +{
      +  "default": "",
      +  "type": "string"
      +}
    • addedInput schema / properties / jurisdiction
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null
      +}
  3. Changed2 schema fields changed
    • addedInput schema / properties / signed_transaction
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null
      +}
    • addedInput schema / properties / verify
      Added value: +{
      +  "default": true,
      +  "type": "boolean"
      +}
  4. First observed

TDQS

A3.8/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already declare destructiveHint=true and readOnlyHint=false. The description goes beyond by explaining the idempotency_key behavior (replaying original result on retry), the two-phase signed_transaction/verify flow (and that cancel needs no state re-read), and the geo-gated jurisdiction aspect. It also clarifies that the venue_action is used to force the venue's own relay route. This adds meaningful behavioral context that annotations do not cover, without contradicting them.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is structured in clear thematic paragraphs (purpose, jurisdiction, idempotency, two-phase, venue_action) and front-loads the core purpose in the first sentence. It is longer than average but each paragraph adds essential context that justifies its presence. It could be slightly tighter by consolidating the repeated 'see place_perp_order' references, but overall it is well-organized and skimmable.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The tool is complex (11 params, two-phase execution, idempotency, geo-gating) and the description addresses most advanced concepts by delegating details to place_perp_order. However, it leaves basic parameters unexplained and omits any discussion of failure modes or error handling. Since an output schema exists, return value documentation is not required, but the description could still be more self-contained. For a destructive, non-idempotent operation, missing details about precondition checks or side effects limit completeness.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

With 0% schema description coverage, the description must compensate. It explains idempotency_key, signed_transaction, verify, venue_action, and jurisdiction (by reference to place_perp_order). However, it does not explain core parameters like wallet_address, order_id, ip, caller_id, or acknowledge_tier_b. It relies heavily on referencing place_perp_order, which may be acceptable if that tool is well-documented, but the current description alone leaves several parameters under-explained. Given the high parameter count and low coverage, a score of 3 reflects partial compensation.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description opens with a clear, specific statement: 'Cancel a resting perp order on its venue (non-custodial).' This identifies the verb (cancel), the resource (resting perp order), and a key differentiator (non-custodial, on its venue). It distinguishes itself from siblings like perp_close or perp_modify by specifying 'resting order' rather than a position or modification. The reference to place_perp_order for shared details further clarifies scope without confusing the primary purpose.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies use for cancelling open orders but never explicitly contrasts with related tools. It points to place_perp_order for shared patterns, but does not state when to use this versus perp_close (closing a position) or perp_modify. The context of 'resting perp order' is clear enough for an informed agent, but explicit exclusionary guidance ('use X instead') is absent. This meets a minimum viable level but leaves room for ambiguity.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources