Skip to main content
Glama

Cancel an order or DCA

cancel_order
DestructiveIdempotent

Cancel one open order or a whole DCA schedule. Moves no funds; not reversible. Pass EXACTLY ONE of order_id (from get_my_orders) or schedule_id (stops every remaining DCA slice; filled slices stay filled). A cancelled stop-loss stops protecting the position, and re-placing it gets whatever price is available then. Confirm which order when there are several. Cancels are never blocked by the user's order-type switches.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "cancel_order"
  }
}

Input Schema

NameRequiredDescriptionDefault
order_idNo`order_id` from `get_my_orders`. Omit when cancelling a DCA by `schedule_id`.
schedule_idNo`schedule_id` from `get_my_dca_schedules` — cancels that whole DCA.

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changed
    • removedInput schema / properties / order_id / title
      Removed value: -"Order Id"
    • removedInput schema / properties / schedule_id / title
      Removed value: -"Schedule Id"
    • removedInput schema / title
      Removed value: -"cancel_orderArguments"
  2. First observed

TDQS

A4.8/5.0
Behavior5/5

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

Goes well past the annotations: it discloses that no funds move, that the action is not reversible, that a DCA cancel stops remaining slices but leaves filled ones filled, and that a cancelled stop-loss leaves the position unprotected with re-entry at whatever price exists then. The note that order-type switches never block cancellation is non-obvious operational context an agent could not infer from destructiveHint/idempotentHint alone.

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?

Front-loads what is cancelled, then safety, then the parameter rule, then edge-case consequences. Every sentence carries distinct information; no restatement of the title or schema.

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

Completeness5/5

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

For a destructive, open-world mutation with an output schema already defined, the description supplies precisely what is missing: irreversibility, scope of each parameter, and downstream risk of cancelling protective orders.

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

Parameters5/5

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

Schema coverage is already 100%, but the description adds the mutual-exclusivity contract ('EXACTLY ONE of'), which the schema does not encode — required is empty and both fields are nullable, so nothing in the schema prevents passing both or neither. It also clarifies the blast radius of schedule_id (all remaining slices).

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?

Opens with a specific verb and resource ('Cancel one open order or a whole DCA schedule'), covering both modes the tool supports. It is clearly distinguished from sibling creation tools like create_order and from the read tools that supply the identifiers.

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?

States the selection rule explicitly ('Pass EXACTLY ONE of order_id... or schedule_id') and points to get_my_orders and get_my_dca_schedules for sourcing IDs. Adds a practical guard ('Confirm which order when there are several'), though it never names a sibling to use instead when cancellation is the wrong action.

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