Skip to main content
Glama

Cancel an order

cancel_order
DestructiveIdempotent

Cancels the connected person's own order under the same rules as the WaitApp website: free while the venue or a rider has not 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. When the connection is set to confirm each decision, the first call returns what would be cancelled and cancels nothing, and a call with confirmed: true cancels. With full control it cancels immediately, at most 3 a day.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "cancel_order"
  }
}

Input 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.6/5.0
Behavior5/5

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

Adds substantial context beyond annotations: refund is flagged for venue review but never instant/automatic, the first confirm-mode call is a non-destructive preview returning what would cancel, and there is a 3-per-day cap. These details are consistent with destructiveHint=true and idempotentHint=true and materially deepen understanding.

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?

Leads with the core action, then layers eligibility rules, refund behavior, and the confirmation/rate-limit mechanics in a logical order. Dense but nearly every clause carries decision-relevant information; slightly long for a single sentence chain.

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?

With no output schema, the description compensates by explaining what the preview call returns and what cancellation does not do (no instant refund). Eligibility, rate limits, and confirmation semantics are all covered, leaving no critical gap for correct invocation.

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 coverage is 80%, so baseline is 3, but the description adds real meaning to the confirmed flag by explaining the preview-then-confirm flow rather than just 'records agreement'. reason and restaurantId disambiguation are left to the schema, keeping it from a 5.

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 (Cancels) and resource (order) scoped to the connected person's own order, immediately distinguishing it from booking/listing siblings. The scope qualifier prevents confusion with any admin-side cancellation.

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?

Gives clear when/when-not conditions: free until the venue or rider starts, refused once collecting/food held, and distinguishes confirm-mode vs full-control behavior. It doesn't explicitly name sibling alternatives (e.g. list_my_orders, track_order), leaving that inference to the schema, but the situational guidance is strong.

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