Skip to main content
Glama

Cancel an order

cancel_order

Cancels the unsent pieces of an order to stop pending execution; pieces already being sent may still complete.

Instructions

Cancels the pieces of an order that have not been sent yet. A piece already being sent may still complete.

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

Input Schema

NameRequiredDescriptionDefault
orderIdYesOrder id from route_order or get_orders

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.1

TDQS

A3.6/5.0
Behavior4/5

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

With no annotations, the description carries the full load and does disclose the most important trait: cancellation is partial, applying only to un-sent pieces, and in-flight pieces may still complete. This is real behavioral context an agent could not get from the schema. It stops short of stating reversibility, idempotency, or what happens if the order is already fully sent or unknown.

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?

Two short sentences, front-loaded with the core action and followed by the caveat that matters most to an agent deciding whether to call it. No filler or repetition, though a little more operational detail would not have hurt.

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?

For a single-parameter mutation tool with no annotations and no output schema, the description covers the main behavior but leaves the agent guessing about the response (does it return cancelled pieces? a status?), error conditions, and whether a repeat call is safe. Those gaps are tolerable given the tool's simplicity but are not trivial.

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?

Only one parameter, and the schema already documents it at 100% coverage, including a pointer to route_order or get_orders for obtaining the id. The description adds no format, constraint, or edge-case detail about orderId beyond that. Baseline 3 is appropriate when the schema does the work.

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 ("Cancels the pieces of an order") plus a meaningful scope qualifier ("that have not been sent yet"), which an agent cannot infer from the name alone. It does not explicitly contrast itself with siblings such as route_order, but the resource and partial-scope framing make the operation unambiguous.

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?

Usage is only implied: the agent can infer this is the tool to call with an orderId to stop an order. There is no statement of when to prefer it, no prerequisites (e.g., order must be open), and no named alternative or exclusion. The second sentence describes an outcome, not when-to-use guidance.

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