Skip to main content
Glama

Cancel an order

cancel_order
DestructiveIdempotent

Cancel a single order by clientId. For SHORT_TERM pass goodTilBlock; for LONG_TERM/CONDITIONAL pass goodTilTimeSeconds (the original good-til value, available from get_open_orders). Returns confirmation with the verified result (canceled / still_open / filled / pending): code: 0 only means the cancel was broadcast. If still_open, the goodTil value likely did not match the original — retry.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
marketYes
confirmNoVerify the cancel actually took via the indexer (default true).
clientIdYes
orderFlagsYes
goodTilBlockNo
goodTilTimeSecondsNo

TDQS

A4.5/5.0
Behavior5/5

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

Discloses return format ('confirmation' with possible values), code meaning, and potential mismatch behavior. Adds value beyond annotations (idempotentHint, destructiveHint) by detailing verification and retry guidance.

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 sentences, front-loaded with purpose. Second sentence is long but packs necessary details. Could be broken into structured points for readability, but still 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?

Covers return values, error states, and retry logic despite no output schema. Parameters are mostly explained. Missing explanation of market parameter, but overall adequate for a cancel operation.

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 low (17%), but description explains purpose of clientId, goodTilBlock, goodTilTimeSeconds, and orderFlags. Clarifies which good-til field to use per flags. Does not explain market or confirm beyond schema.

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?

Clearly states 'Cancel a single order by clientId', specifying the resource (order) and action (cancel). Distinguishes from siblings like batch_cancel and cancel_all_orders by focusing on single order cancellation.

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?

Provides explicit instructions for parameter selection based on order type (SHORT_TERM vs LONG_TERM/CONDITIONAL) and what to do if 'still_open' is returned. Lacks explicit mention of when not to use this tool versus alternatives.

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.

TDQS

A3.7/5.0
Disambiguation3/5

Most tools are clearly distinct, but there is overlap among the read-heavy account tools: get_balance/get_funding_status/fund virtually duplicate each other, and get_equity/get_portfolio/get_position_risk/get_open_orders/get_positions all converge on equity and open-position data. The detailed descriptions help an agent choose, but several tools have fuzzy boundaries.

Naming Consistency4/5

The overwhelming majority follow the expected verb_noun convention: get_*, place_*, cancel_*, close_*. Minor deviations such as batch_cancel, get_candles_multi, top_up_gas, and whoami make the pattern not perfectly uniform, but the inconsistency is small.

Tool Count2/5

At 33 tools, the surface is beyond what most agents need and includes several redundant query helpers rather than genuinely distinct operations. A broad exchange can justify a large surface, but get_balance/get_funding_status, get_equity/get_portfolio/get_position_risk, and get_candles/get_candles_multi make the set feel top-heavy.

Completeness4/5

The core lifecycle is well covered: market discovery, market data, order placement/cancellation, position management, risk, funding transfers, PnL, and account status. Obvious gaps are limited to historical order lookup by order ID, a way to cancel across all markets in one call, and a few optional account-history conveniences.