Skip to main content
Glama

Cancel an order

cancel_pickup_order
DestructiveIdempotent

Cancel a pickup order when the user asks, with the claim create_pickup_order returned. An unpaid order just closes. A paid one can be cancelled until the shop starts making it, and what was paid goes back the way it was paid (a card refund can take a few business days to show). Once the shop has started it, or it's ready, the user asks staff at the counter instead.

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>",
      "claim": "<claim>"
    },
    "name": "cancel_pickup_order"
  }
}

Input Schema

NameRequiredDescriptionDefault
claimYesThe claim create_pickup_order returned with the order.
order_idYes
shop_urlNoAn agentPickup shop's URL, as find_shops returns it. Defaults to https://agentpickup.app.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.5/5.0
Behavior5/5

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

Annotations declare destructive and idempotent but say nothing about process; the description fills that in with state-dependent outcomes (unpaid orders simply close, paid orders are cancellable only until the shop starts making them) and refund behavior including the multi-business-day card delay. It also names the fallback channel when cancellation is no longer possible, which is exactly the operational context annotations cannot carry.

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?

Four short sentences, front-loaded with the trigger and prerequisite, then the state rules, then the escalation path — no repetition or filler. The second sentence stacks unpaid/paid behavior and refund timing into one compound block, which is slightly dense but still readable.

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?

For a destructive one-shot mutation with annotation coverage and no output schema, the description supplies preconditions, side effects, timing expectations, and the failure/escalation route. The remaining gap is what the caller gets back after a successful cancel and whether a retry with the same claim is safe, though idempotentHint partly covers the latter.

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 67% and two of the three parameters already carry descriptions, so the schema does most of the work. The description only reinforces the claim parameter by tying it to create_pickup_order's return; order_id remains undocumented in both places and shop_url's default behavior is not elaborated on. Baseline 3 is appropriate.

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 opening clause gives a specific verb and resource ("Cancel a pickup order") and immediately scopes it to orders the agent created ("with the claim create_pickup_order returned"). An agent can tell exactly which operation it is and which objects it applies to, 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 Guidelines5/5

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

It states the trigger ("when the user asks"), the prerequisite (the claim returned by create_pickup_order), and an explicit when-not with an alternative: "Once the shop has started it, or it's ready, the user asks staff at the counter instead." Nothing about applicability is left to inference.

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.