Skip to main content
Glama

Cancel Pending Trade

cancel_pending_trade
Destructive

Cancel a pending trade before in-app confirmation. This cannot cancel an already executed, expired, or previously resolved trade.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pending_trade_idYesPending trade ID returned by execute_trade or list_pending_trades.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
errorNo
statusNo
messageNo
successNo
pending_trade_idNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.2/5.0
Behavior4/5

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

Annotations already flag destructiveHint=true, readOnlyHint=false, and idempotentHint=false. The description adds crucial context: the timing constraint (before in-app confirmation) and failure conditions for executed/expired/resolved trades. This goes beyond annotations, though it doesn't explain the exact impact of cancellation or whether it can be undone.

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?

Two concise sentences, front-loaded with the core action and immediately followed by the key limitation. No wasted words.

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?

Complete for a simple cancel operation: purpose, timing, and exclusions are clear. The presence of an output schema means return values needn't be explained. Minor gap: no guidance on error handling or whether the trade ID can be reused.

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%, so the parameter is fully documented in the schema (pending_trade_id with its origin). The description adds no extra parameter details, which is acceptable given the high coverage.

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?

Specific verb (cancel) and resource (pending trade) with an explicit precondition ('before in-app confirmation'). This distinguishes it from sibling tools dealing with executed trades or status queries.

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?

Clearly states when the tool works (pending trades before confirmation) and excludes already executed, expired, or resolved trades. However, it does not name alternative tools (e.g., use get_pending_trade_status to check first) or describe when cancellation is appropriate versus other actions.

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