Skip to main content
Glama

Cancel an order

cancel_order
DestructiveIdempotent

No version argument. Cancel an open order. Two routes: pass 'signature' (signed over what prepare_cancel_order returned) to relay a gasless cancellation - state-changing, and the route an intent order takes; omit 'signature' entirely for the on-chain route, which returns the cancel transaction for the user to sign and send, the route an order that went on chain (a native-token sell) takes. The server never signs.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
orderIdYesThe order id (from submit_signed_order's receipt, get_order_status or get_pending_orders).
signatureNoThe user's cancellation signature (0x...) over prepare_cancel_order's typed data. Omit the argument entirely to get the on-chain cancel transaction instead.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.6/5.0
Behavior5/5

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

The description discloses meaningful behavioral details beyond the annotations: the gasless route is state-changing, the on-chain route returns a transaction for the user to sign and send, and the server never signs. This significantly clarifies the division of responsibility between the server and user. It does not contradict the provided annotations.

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

Conciseness5/5

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

The description is dense but efficient: the no-version note, core action, route logic, and server-signing boundary are each given in a few concise sentences. Every statement earns its place, and the most important routing information is front-loaded.

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

Completeness4/5

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

For a state-changing tool with no output schema and two distinct routes, the description covers prerequisites, route selection, and the on-chain route's return behavior. It does not describe the gasless route's success/error output in detail, but annotations cover idempotency and destructive behavior. Overall, an agent has enough context to call this tool correctly.

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

Parameters4/5

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

Schema coverage is 100%, so the baseline is 3. The description adds value by explaining the semantic difference between providing 'signature' versus omitting it, tying each route to order types (intent vs native-token sell). This enriches the schema's parameter descriptions rather than merely repeating them.

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 clearly states the tool cancels an open order, naming the resource and action precisely. It further distinguishes the two execution routes and references prepare_cancel_order, which differentiates this execution step from the preparation step. The title reinforces the purpose as well.

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

Usage Guidelines4/5

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

The description gives an explicit route-selection rule: pass 'signature' for the gasless route used by intent orders, or omit it for the on-chain route used by native-token sells. It also implicitly establishes prepare_cancel_order as a prerequisite. However, it does not explicitly name exclusions or alternatives beyond prepare_cancel_order, such as when not to use this tool.

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