Skip to main content
Glama

Vectorial Data Terminal: Hyperliquid, Polymarket & yield for AI agents

cancel_order

DestructiveIdempotent

Cancel a resting order by ledger id. Paper executes immediately.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "order_id": "<order_id>"
    },
    "name": "cancel_order"
  }
}

Input Schema

NameRequiredDescriptionDefault
order_idYesThe order_id of a resting order (see list_orders)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedInput schema / properties / order_id / description
      Added value: +"The order_id of a resting order (see list_orders)"
  2. First observed

TDQS

B3.4/5.0
Behavior3/5

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

Annotations already declare destructiveHint=true, idempotentHint=true, and openWorldHint=true, so the mutation profile is covered. The description adds the useful non-obvious constraint that only resting orders can be cancelled and a note about paper-mode immediacy, but that note is cryptic and leaves open what happens to a non-resting order or what the response contains.

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?

Two short sentences with the core action front-loaded and no filler. The second sentence is terse to the point of being ambiguous, but nothing is wasted.

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?

For a single-parameter mutation tool with no output schema and rich annotations, the description covers the essentials but omits the outcome: what a successful cancel does to any associated funds/positions and how failure on a filled order is surfaced.

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?

Schema coverage is 100% and the schema already explains order_id and references list_orders. The description adds only the 'resting order' qualifier; its use of 'ledger id' is slightly at odds with the parameter name order_id, which could cause hesitation but is not materially misleading.

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

Purpose4/5

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

States a specific verb (cancel) and resource (a resting order) plus the identifier used, which is enough to distinguish it from listing tools like list_orders. It does not name a nearest alternative (e.g., close_position for open positions), so sibling differentiation is only partial.

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 phrase 'resting order' implies the precondition that the order must be open/unfilled, and the schema points to list_orders for obtaining the id. However, there is no explicit statement of when to use this versus close_position or other order-management siblings, and no guidance on what to do if the order is already filled.

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.