Skip to main content
Glama

cancel_order

Cancel an order, stopping it before it is printed. With the order_token from create_order this works while the order is awaiting_payment. A platform that sends its own API key (Authorization: Bearer mp_live_...) can additionally cancel an order THAT KEY created while it is confirmed or printing — that is how you stop a press when your customer cancels on your side. shipped and delivered can never be canceled; that is a refund, contact support (see get_catalog). Canceling stops production but moves no money, and it releases the order's client_reference — replaying that reference afterwards creates a new order and prints it. If the order moved on before the cancel landed you get not_cancellable naming its new status, never a false "canceled".

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
order_idYes
order_tokenNoThe token returned once by create_order. Optional if you send the API key that created the order instead.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • addedInput schema / properties / order_token / description
      Added value: +"The token returned once by create_order. Optional if you send the API key that created the order instead."
    • changedInput schema / required
      Previous value: -[
      -  "order_id",
      -  "order_token"
      -]New value: +[
      +  "order_id"
      +]
  2. First observed

TDQS

A4.8/5.0
Behavior5/5

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

No annotations are provided, so the description carries full responsibility. It discloses key behaviors: cancellation does not move money, releases the client_reference (allowing reprint), and handles race conditions by returning not_cancellable rather than falsely claiming success.

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

Conciseness4/5

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

The description is a single dense paragraph, front-loaded with the core purpose. Every sentence adds distinct value, but the length is substantial; a structured list could improve scannability.

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?

Given the complexity of cancellation semantics, the description covers all relevant scenarios, effects, and errors. It also references the appropriate sibling tool for refunds, making it self-contained despite the lack of an output schema.

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?

The schema provides descriptions for order_token but not order_id. The description enhances understanding of order_token's role and alternates, and explains error conditions. order_id is implied as the order to cancel, but its origin is not explicitly stated beyond context.

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 opens with 'Cancel an order, stopping it before it is printed', a specific verb and resource that clearly distinguishes this from siblings like create_order and get_order. It continues with concrete state-based behavior, further differentiating from related tools.

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?

Provides explicit when-to-use guidance: cancel works while awaiting_payment with order_token, and platform-created orders can be canceled even in confirmed/printing states. It also states when not to use it (shipped/delivered cannot be canceled) and directs to refund alternatives via get_catalog.

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