Skip to main content
Glama

Prepare an order cancellation (EIP-712 to sign)

prepare_cancel_order
Read-only

No version argument. From an orderId, return the EIP-712 cancellation for the user to sign; cancel_order relays the result. This is the gasless route for an intent order; an order that went on chain (a native-token sell) is cancelled with cancel_order's transaction route instead, which needs no signature and no prepare. Non-custodial: this returns what the user signs, and commits nothing.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
orderIdYesThe order id (from submit_signed_order's receipt, get_order_status or get_pending_orders).

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already establish readOnlyHint=true and destructiveHint=false. The description adds context by stating it is non-custodial, commits nothing, and only returns what the user signs, which clarifies the side-effect profile beyond the raw annotation booleans.

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 three sentences with no filler. It front-loads the purpose and version caveat, then adds routing and safety context, every clause contributing useful information.

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 single-parameter tool with read-only annotations, the description covers the routing decision, signature requirement, version behavior, and side-effect profile. There is no output schema, so the description adequately conveys the return value as an EIP-712 cancellation to sign, though it does not detail its structure.

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 only parameter, orderId, already has a description with source hints. The tool description mentions 'from an orderId' but adds no additional parameter semantics beyond what the schema provides, so baseline 3 is appropriate.

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 states a specific verb and resource: from an orderId, it returns the EIP-712 cancellation payload for the user to sign. It clearly differentiates itself from cancel_order, which relays the result, and from the transaction route.

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

Usage Guidelines5/5

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

It explicitly names cancel_order as the alternative and explains the split: intent orders use this gasless prepare-then-sign route, while native-token sell orders on chain use cancel_order's transaction route without prepare or signature. This is strong when-to-use guidance.

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