Skip to main content
Glama

Cancel an order

shop.order.cancel
DestructiveIdempotent

QUOTED: free cancel, the quote is voided and held stock released. After payment: before the merchant confirms it is always a refund (state REFUND_PENDING, due in 7 days); later only if the merchant accepts returns and the refund window is open, else 409 with the policy. Digital content delivered under waive_withdrawal cannot be cancelled.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
reasonYes
order_idYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
stateYes
order_idYes
refund_idNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedOutput schema / properties / refund_id
      Added value: +{
      +  "type": [
      +    "string",
      +    "null"
      +  ]
      +}
  2. Added

TDQS

A3.8/5.0
Behavior5/5

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

Annotations only declare it is destructive, idempotent, and not read-only. The description adds substantial beyond that: the quote is voided and held stock released, refunds enter REFUND_PENDING with a 7-day deadline, blocked cases return 409 with the merchant policy, and digital content under waive_withdrawal is excluded.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

It is a single dense sentence that packs state-dependent behavior, but the leading 'QUOTED:' fragment reads as a leftover artifact and the flow jumps straight into conditions rather than front-loading what the tool does.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

An output schema exists so return values need not be restated, and annotations cover the safety profile; the description richly covers state transitions and error cases. The remaining gap is that neither the schema nor description explains the two parameters.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0% for both required parameters (order_id, reason). The description never explains what order_id identifies or what the reason field is for or its 1-500 char constraint, so it fails to compensate for the undocumented schema.

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?

The description makes clear this cancels an order and specifies the scope across order states (quoted, paid-but-unconfirmed, confirmed, digital content). It is specific about which cases can and cannot be cancelled, though it never plainly names the sibling alternatives it competes with.

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 gives real conditional guidance: for unpaid quotes it is a free cancel, pre-confirmation it is always a refund, and post-confirmation only if returns are accepted and the refund window is open, otherwise 409. It tells the agent when the operation succeeds versus fails without naming an alternative tool for those blocked cases.

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.