Skip to main content
Glama

Acme Store

Cancel an order

cancel_order
DestructiveIdempotent

Cancel a sandbox order and put its stock back. Use it to undo place_order; the order stays on record with its original prices. Returns the cancelled order, or a 403 problem when the receipt key does not match.

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

Input Schema

NameRequiredDescriptionDefault
order_idYesthe order id, from place_order
receipt_keyYesthe value of key in the order's confirmation_path

Output Schema

NameRequiredDescriptionDefault
errorNo
orderNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.7/5.0
Behavior5/5

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

Beyond the annotations, it discloses key side effects: stock is restored, the order remains on record with original prices, and a mismatched receipt key yields a 403 problem. These details materially clarify the destructive and idempotent behavior.

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?

Three compact sentences front-load the action, then usage, then side effects and error behavior. There is no redundant or filler wording.

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?

With a complete input schema and an output schema, the description does not need to restate return structure. It still covers the operation's scope, side effects, relationship to place_order, and key failure mode, making it complete for this tool.

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 100%, so the schema already documents both parameters. The description adds useful semantic context by explaining that receipt_key mismatch causes a 403 failure, which goes beyond the schema's field-level guidance.

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 description uses a specific verb and resource ('Cancel a sandbox order') and immediately ties it to a concrete sibling action ('undo place_order'). An agent can distinguish this from placement or cart tools without inspecting 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 Guidelines4/5

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

It explicitly names the scenario ('Use it to undo place_order') and scopes use to sandbox orders. It does not state explicit exclusions or alternative cancellation paths, but the intended use context is clear.

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