Skip to main content
Glama

Cancel an order

cancel_order
DestructiveIdempotent

Cancel an order that has not shipped. This cannot be undone. Call it first with confirm=false to get the order details, show them to the user, and only after the user explicitly agrees call again with confirm=true.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
confirmNoSet true only after the user has explicitly confirmed the cancellation.
orderIdYesThe order id, for example o-5001.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.9/5.0
Behavior5/5

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

Annotations already declare destructiveHint=true and non-readOnly, and the description reinforces this with 'This cannot be undone.' Beyond that, it discloses the confirm-gated two-call workflow, which is behavioral context the annotations cannot express and is essential to avoid an accidental irreversible cancellation.

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?

Two front-loaded sentences: the capability and its irreversibility come first, the safe invocation sequence second. Every clause earns its place with no redundancy.

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 two-parameter destructive tool with no output schema, the description supplies the precondition, the irreversibility warning, and the mandatory confirmation sequence. There is no output schema to explain, and an agent has everything needed to call it safely.

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 description coverage is 100%, so the baseline is 3, but the description actively adds meaning for 'confirm' by prescribing the staging call (confirm=false) and the exact moment to pass true. That extra protocol guidance lifts it above the schema alone.

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?

States a specific action and resource ('Cancel an order') plus a hard precondition ('that has not shipped'), which immediately separates it from the create/read-oriented siblings (create_order, get_product, search_products). An agent can identify the tool's job without opening the schema.

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?

Gives an explicit precondition (only pre-ship orders), an explicit two-step protocol (call with confirm=false, present details, then call with confirm=true only after user agreement), and an implicit exclusion (shipped orders cannot be cancelled). Nothing about when to invoke 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.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.