Skip to main content
Glama
kite-connect-mcp

kite-connect-mcp

Cancel an open order (dry run by default)

cancel_order
Destructive

Cancel an open or pending order with dry-run validation by default. Preview the cancellation first, then confirm live with a single-use token to manage trading risk.

Instructions

Cancel an open or pending order. DRY RUN BY DEFAULT, confirmed like place_order (cancelling a stop-loss can increase risk, so it is not exempt). Caps do not apply to cancellations.

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
dry_runNotrue (default): validate and preview only, nothing is sent. false: send it live, which needs live trading enabled on the server and the confirmation_token from a dry run
varietyNothe order's variety (it is part of the URL)regular
order_idYes
parent_order_idNoco second leg: the parent
confirmation_tokenNothe confirmation_token returned by a dry run of this exact call (single use)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.7/5.0
Behavior3/5

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

Annotations already declare destructiveHint=true, idempotentHint=false and readOnlyHint=false, so the mutation profile is known. The description adds genuinely useful context the annotations do not: dry run is the default, cancellation is not exempt from confirmation, and the risk rationale (cancelling a stop-loss can increase risk). It stops short of describing failure modes such as an already-filled order or what a dry run returns.

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?

Three short sentences, front-loaded with the action and then the safety-critical dry-run default. Every clause carries information; only the parenthetical risk note competes slightly with the main instruction.

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

Completeness3/5

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

No output schema exists, so the description would ideally say what a dry run returns and what happens on failure. It does cover the confirmation-token workflow and the risk note, which are the main things an agent needs before calling a destructive tool, but the return/error side is left implicit.

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 80% and the schema already explains dry_run, confirmation_token, variety and parent_order_id in detail, so the baseline is 3. The description adds the cross-cutting rule that caps do not apply to cancellations, which is not encoded in any parameter schema and clarifies that margin/limit checks are irrelevant here.

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?

States a specific verb and resource ('Cancel an open or pending order') and immediately narrows the scope to open/pending orders, which distinguishes it from read-side siblings like get_orders and get_order_history. It does not explicitly contrast with modify_order or delete_gtt_order, so sibling differentiation is partial rather than explicit.

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?

Gives clear operating context: it works on open or pending orders, runs as a dry run by default, and requires the same confirmation step as place_order. It never states when an agent should prefer modify_order over cancelling, but the preconditions and the default-safe invocation path are spelled out.

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