Skip to main content
Glama

Ferrite Supply

cancel_order

Idempotent

Cancel an order that has not been paid. Use it when the buyer changes their mind, and after trying out an order on the public demonstration, so that its stock goes back on sale. Returns the cancelled order; cancelling it again changes nothing.

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

Input Schema

NameRequiredDescriptionDefault
order_idYesthe order id
manage_tokenYesthe manage token place_guest_order returned for this order; it can also be sent as the x-order-token header

Output Schema

NameRequiredDescriptionDefault
idYesThe order id (FS-… for a customer, FG-… for a guest).
guestYesWhether a guest placed it.
itemsYesThe lines.
couponNoThe coupon applied, if any.
statusYesplaced | checkout_open | payment_pending | paid | fulfilled | shipped | delivered | cancelled | expired | refunded.
deliveryYesA UK delivery address.
created_msYesWhen it was placed (epoch ms).
updated_msYesWhen it last changed (epoch ms).
user_emailYesThe contact email.
total_penceYesThe total the customer pays, in pence.
checkout_urlNoThe hosted checkout URL, once checkout opened.
refund_stateNoThe refund state Stripe reported, once refunded.
discount_penceYesThe discount in pence.
shipping_penceYesThe delivery charge in pence.
stock_reservedYesWhether stock is still reserved against this order.
subtotal_penceYesThe subtotal in pence.
shipping_choiceYesstandard | express.
tracking_numberNoThe tracking number, once shipped.
tracking_carrierNoThe carrier, once shipped.
stripe_session_idNoThe Stripe Checkout Session id, once checkout opened.
confirmation_emailNoThe confirmation-email outbox entry, created at payment.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.9/5.0
Behavior3/5

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

Annotations already declare idempotentHint=true and readOnlyHint=false, and the description adds real value by disclosing the side effect (stock returns on sale) and the unpaid precondition. However, 'cancelling it again changes nothing' largely restates idempotentHint, and nothing is said about what happens to paid orders or any authorization requirement beyond the schema's token field.

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?

Two sentences, front-loaded with the action and precondition, with the return behavior and idempotency placed last. Only mild redundancy with the idempotency annotation keeps it from being maximally tight.

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?

Output schema exists, so omitting return-value detail is fine and the tool is simple (2 required params). The definition covers precondition, motivation, side effect, and repeat-call behavior; only the token/authorization nuance lives solely in the schema.

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%, so order_id and manage_token (including the header alternative) are already fully documented. The description mentions the order conceptually but adds no format or token semantics beyond the schema, so the baseline 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?

'Cancel an order that has not been paid' gives a specific verb, resource, and precondition, and adds what the tool returns. An agent can immediately distinguish this from read siblings like get_order or mutation siblings like place_guest_order.

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?

Explicitly states when to reach for it (buyer changed their mind, after a demo order) plus the gating condition that the order must be unpaid, which implicitly excludes paid orders. It stops short of naming a sibling alternative to use for paid orders or refunds.

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