Skip to main content
Glama

cancel_order

Destructive

Cancel an existing order after human approval; shipped orders cannot be cancelled, and refused or timed-out requests are denied and logged.

Instructions

Cancel one of your orders. Irreversible, so it is gated: a human must approve before it runs, in this client's approval form if it shows one, else on the server's terminal. An order that has shipped can't be cancelled. If the approver refuses, doesn't answer within two minutes, or there is nowhere to ask, the call is denied and the refusal is logged. To record information without cancelling, use add_note.

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_idYesThe order's ID, e.g. '4417'. Use list_orders to find one.

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.3.0
    • addedInput schema / properties / order_id / description
      Added value: +"The order's ID, e.g. '4417'. Use list_orders to find one."
  2. First observedv1.0.0

TDQS

A4.6/5.0
Behavior5/5

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

Annotations already declare destructiveHint=true, but the description goes well past that: it names the human approval gate, the two possible approval surfaces (client form or server terminal), the two-minute timeout, the failure modes that produce denial, and that refusals are logged. That is exactly the operational context an agent needs before invoking a destructive action and is not derivable from the annotation flags.

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 action and its irreversibility are front-loaded, and each subsequent sentence adds a distinct fact (approval gate, precondition, denial conditions, alternative tool). It is slightly dense with clauses about the approval mechanism, but no sentence is redundant.

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 single-parameter destructive tool with an output schema present, the description covers everything that matters: side effects, approval workflow, timing, denial behavior, and preconditions. Return values need not be described given the output schema, and annotations handle the safety classification.

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?

Schema description coverage is 100% and the single order_id parameter already carries a format example ('4417') plus a pointer to list_orders, so the structured data does the work. The description adds no additional meaning about the parameter, which is the expected baseline when coverage is complete.

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 opening sentence gives a specific verb and resource with scope ("Cancel one of your orders"), immediately distinguishable from the sibling add_note which is named as the non-cancelling alternative. It also states a hard precondition ("An order that has shipped can't be cancelled") so the agent knows the domain boundary of the action.

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

Usage Guidelines5/5

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

The description gives explicit when-not guidance (shipped orders cannot be cancelled) and routes the agent to a named alternative for the adjacent intent: "To record information without cancelling, use add_note." Nothing about selecting between the two is left to inference.

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

Deploy Server

Other Tools