Skip to main content
Glama
IBKR MCP Server

IBKR MCP Server

cancel_order

Cancels an open Interactive Brokers order using its order ID, stopping pending execution and helping prevent unwanted fills.

Instructions

Cancel an open order.

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": {
      "order_id": "<order_id>"
    },
    "name": "cancel_order"
  }
}

Input Schema

NameRequiredDescriptionDefault
order_idYes

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

C2.7/5.0
Behavior2/5

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

No annotations are provided, so the description carries the full behavioral burden, yet it only says what the tool does. It does not disclose what happens if the order is already filled, partially filled, already canceled, or invalid, nor does it mention permissions, reversibility, or side effects. Because an output schema exists, return-value details are less necessary, but the mutation behavior remains underexplained.

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 description is a single short sentence with no wasted wording, and the core action is front-loaded. It is arguably too terse, but that weakness is better captured under completeness rather than verbosity.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a destructive mutation tool with no annotations, the description is incomplete. An agent needs to know the constraints on cancellation and what happens when cancellation is impossible, neither of which is addressed. The presence of an output schema covers return-value expectations but not the operational gaps.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

There is one required parameter, order_id, and schema description coverage is 0%, so the description must add meaning. It does not explain the identifier's expected format, source, or whether it must reference an open order. The parameter name is self-explanatory, but the description adds no semantic detail beyond what the schema already shows.

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 states a specific verb and resource: cancel an order. It also narrows scope to open orders, which helps an agent distinguish this from order-placement tools. However, it does not explicitly point to siblings such as get_open_orders for finding a cancellable order.

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

Usage Guidelines2/5

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

The description provides no guidance on when this tool should be used versus alternatives, and it does not mention prerequisites such as first retrieving open orders. The only implied condition is that the order must be open, but there are no exclusions or operational context.

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