Skip to main content
Glama

Cancel a limit order

cancel_limit_order
Read-only

Get the EIP-712 OrderCancellations typed data to cancel a CoW limit order off-chain (gasless). The owner signs it; POST {chainId, orderUids:[uid], signature} to /limit/cancel on the SwapChan API. Never signs. How to combine this with the other tools: swapchan_playbook (workflows: find-money, best-swap, rebalance, revoke-approvals, bridge-stuck, token-safety, recover-old-wallet).

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": {
      "chainId": "<chainId>",
      "uid": "<uid>"
    },
    "name": "cancel_limit_order"
  }
}

Input Schema

NameRequiredDescriptionDefault
uidYes
chainIdYesChain id where CoW runs: 1 Ethereum, 8453 Base, 42161 Arbitrum, 137 Polygon, 56 BNB, 43114 Avalanche, 59144 Linea

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A3.8/5.0
Behavior4/5

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

Alongside readOnlyHint=true, the description adds real context: it produces typed data, the owner must sign separately, 'Never signs', and the exact POST payload/endpoint to follow. It stays consistent with the read-only annotation rather than contradicting it.

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 core is front-loaded in two tight sentences covering what it returns, who signs, and where to POST. The trailing enumeration of seven playbook workflow names is somewhat verbose and dilutes focus, but the rest is efficient.

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?

With no output schema, the description does the essential work of explaining the returned EIP-712 structure and the follow-up POST step. Only minor gaps remain, such as expected response shape from /limit/cancel or failure cases.

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 only 50% (uid has no description), but the description compensates by showing that uid is wrapped into orderUids:[uid] in the POST body along with chainId and signature. This mapping adds meaning beyond the bare pattern constraint in the schema.

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?

The description names a specific verb and resource (get EIP-712 OrderCancellations typed data to cancel a CoW limit order) and makes clear the tool does not itself cancel. It is distinguishable from build_limit_order and list_limit_orders by the 'typed data' framing, though it never names those siblings explicitly.

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?

Usage is implied through the off-chain/gasless step and the pointer to swapchan_playbook workflows, but there is no explicit 'use this instead of X when Y' guidance or exclusions against build_limit_order or an on-chain cancel path. The agent must infer when this is the right 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.