Skip to main content
Glama

Washawash

cancel_order

DestructiveIdempotent

Cancel an eligible owned order after explicit customer approval and release uncaptured payment authorization. Requires OAuth scope orders:write.

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

Input Schema

NameRequiredDescriptionDefault
approvedYes
order_idYes

Output Schema

NameRequiredDescriptionDefault
okYes
dataNo
errorNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.5/5.0
Behavior4/5

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

Annotations already declare destructiveHint=true, idempotentHint=true and openWorldHint=true, but the description adds real value beyond them: the payment-authorization release is a downstream effect an agent would not infer, and the 'Requires OAuth scope orders:write' line discloses the authorization requirement. It does not explain what 'eligible' excludes or whether a cancellation is reversible.

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 sentences, no filler, with the action and its payment side effect front-loaded and the auth requirement last. Every clause carries information the agent needs.

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 an output schema covering return values and annotations covering destructiveness and idempotency, the remaining gaps to fill were the eligibility precondition, the payment side effect and the auth scope — all present. For a two-parameter, fully required tool this is sufficient to call it correctly.

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 0%, so the description must carry meaning, and it does partially: 'owned order' tells the agent order_id must reference the customer's own order, and 'after explicit customer approval' explains the intent of the approved boolean. The order_id hash format and the const-true constraint on approved are left to the schema.

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 verb and resource ('Cancel an ... order') and adds scope and effect: only 'eligible owned' orders, and the cancellation also 'release[s] uncaptured payment authorization'. That side effect is what separates it from a plain status change such as confirm_order, so an agent can identify it 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 Guidelines4/5

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

Gives a clear precondition — the cancellation must follow 'explicit customer approval' — which tells the agent when this tool is appropriate. It stops short of naming when-not conditions or pointing to a sibling alternative, so it is strong context rather than full routing guidance.

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