Skip to main content
Glama

Cancel Order

cancel_order
Destructive

Cancel a pending or active brokerage order by supplying its client order ID, preventing execution right away.

Instructions

Cancels a pending or active order on the broker account immediately.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
order_idYesThe order's **client_order_id** — the id this server generated when the order was drafted (it looks like `DRFT_9a32c8d5`), NOT the broker's own `order_id`. `get_open_orders` shows both in its last column; the cancel path only accepts the client one.
Install Server

TDQS

A3.8/5.0
Behavior3/5

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

Annotations already provide destructiveHint=true and readOnlyHint=false. The description adds the constraint that only pending or active orders can be canceled and that cancellation happens immediately, but does not disclose other side effects or irreversible consequences beyond what annotations indicate.

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 one concise sentence, front-loading the action and scope. Every word earns its place, with no redundant or vague phrasing.

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 simple one-parameter mutation tool with useful annotations (destructiveHint, readOnlyHint), the description covers the core action and a key constraint. It lacks explicit alternative guidance, but the schema and annotations fill most informational gaps.

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?

The input schema fully describes the order_id parameter, including its client_order_id format and how to obtain it via get_open_orders. The tool description adds no parameter details, so the baseline of 3 for high schema coverage applies.

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 a pending or active order on the broker account, with a specific verb and resource. It distinguishes from sibling tools like draft_order (creates) and get_open_orders (lists), leaving no ambiguity about its function.

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?

The purpose implies usage when an order needs to be canceled, but there is no explicit guidance on when not to use it or comparison with alternatives like preview_order. It is a minimal-viable implied usage, earning a 3.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Blahaj-gif/Finance-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server