Skip to main content
Glama

Send Christmas Postcard

Cancel an order

cancel_order
DestructiveIdempotent

Use only when the user asks to cancel. Takes the private order ref; unpaid orders are cancelled and paid orders are refunded if they have not gone to print. Returns the updated order; fails with order_not_cancellable once printing has started.

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

Input Schema

NameRequiredDescriptionDefault
refYesPrivate order reference returned by prepare_postcard.

Output Schema

NameRequiredDescriptionDefault
refYesPrivate order reference. Treat like a password.
modeYes"test" = free sandbox (never printed, Stripe test card 4242 4242 4242 4242). "live" = real card, printed and mailed. Always explicit.
cardsYes
totalYes
statusYes
createdAtYes
statusUrlYes
recipientsYes
checkoutUrlYesStripe-hosted payment page (when awaiting payment).
nextActionsYesWhat the agent can do next, in order of preference.
frontPreviewUrlYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedOutput schema / properties / recipients / items / properties / refundStatus
      Added value: +{
      +  "description": "Refund outcome for a cancelled or rejected card, when known.",
      +  "enum": [
      +    "pending",
      +    "refunded"
      +  ],
      +  "type": "string"
      +}
  2. First observed

TDQS

A4.5/5.0
Behavior5/5

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

Annotations declare destructiveHint=true and idempotentHint=true, and the description adds real substance on top: the conditional branch (refund only if not yet printed), the refund consequence for paid orders, and the specific failure string order_not_cancellable once printing starts. That is exactly the pre-call risk information an agent needs for an irreversible mutation.

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 short sentences, front-loaded with the usage gate before the mechanism and the failure mode. Every clause carries decision-relevant information; nothing is redundant with the schema or annotations.

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?

An output schema exists, so return shape need not be spelled out, yet the description still notes that the updated order is returned and names the failure case. For a single-parameter destructive tool, an agent has everything needed to decide and to recover on error.

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 coverage is 100% — the ref parameter already carries its pattern and its origin (returned by prepare_postcard). The description only echoes it as "the private order ref," adding a light privacy cue but no format or sourcing detail beyond the schema. Baseline 3 applies.

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 immediately qualifies it with the actual effect: unpaid orders are cancelled, paid orders are refunded. That outcome detail makes the tool's scope unambiguous even without a same-family sibling to contrast against.

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?

"Use only when the user asks to cancel" is an explicit negative constraint that stops an agent from cancelling proactively or as a side effect. It doesn't name alternative tools for related needs (e.g. checking whether cancellation is even possible), so it stops short of full when/when-not routing.

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.