Skip to main content
Glama

Cancel an order

cancel_order
DestructiveIdempotent

Cancel the connected person's own order, under the same rules as the WaitApp website: free while the venue or a rider hasn't started; refused once the rider is collecting or has the food. A paid order is flagged for the venue to review a refund; refunds are never instant or automatic. If the connection is set to confirm each decision, the first call returns what would be cancelled and cancels nothing until a call with confirmed: true. With full control it cancels immediately (at most 3 a day).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
reasonNo
orderIdNoThe orderId from list_my_orders
confirmedNoTrue records that the person agreed to cancel this order
orderCodeNoThe order code returned when the order was placed, e.g. WA-K4M2
restaurantIdNoThe venue the order was placed at (needed with orderCode if the person has the same code at two venues)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.7/5.0
Behavior5/5

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

Goes well beyond the annotations (destructiveHint=true, idempotentHint=true). It discloses the two-phase confirmation protocol — the first call cancels nothing and returns what would be cancelled until a call passes confirmed: true — plus a hard rate limit of 3 per day and the fact that refunds are never automatic. These are exactly the operational facts an agent cannot infer from structured fields.

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?

Dense and front-loaded: purpose first, then eligibility rules, then refund behavior, then the confirmation mechanism. Every clause carries information, but the single run-on sentence packs four distinct policies together, which costs a little scannability.

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, no-output-schema mutation tool, the description covers eligibility, confirmation, rate limits, and refund semantics, so an agent can act correctly. It never describes the shape of a successful normal response, which is the one remaining gap.

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?

Schema description coverage is already 80%, and the description still adds the crucial semantics for 'confirmed' by defining the dry-run-then-commit protocol, which the schema only labels as 'the person agreed to cancel'. It does not add anything for reason or the orderCode/restaurantId disambiguation, which the schema already covers.

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 precise verb and resource ('Cancel the connected person's own order') and immediately anchors the scope to a known reference point ('under the same rules as the WaitApp website'). No sibling tool competes for this action, and the scope qualifier ('own order') prevents ambiguity with anything else in the catalog.

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?

Explicitly enumerates the when-and-when-not conditions: allowed while neither venue nor rider has started, refused once the rider is collecting or has the food. It also states the downstream consequence (paid orders flagged for venue review, never an instant refund), which tells the agent what outcome to expect before calling.

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