Skip to main content
Glama

Thmenu

Cancel an order

cancel_order
DestructiveIdempotent

Cancel an order placed via the same agent_session_id. Atomic — only succeeds while the order is still in "pending" or "confirmed" (the early KDS-accept state). Once the kitchen starts preparing, you must escalate to waiter_call. Idempotent: replays return the original outcome. Idempotency-Key header REQUIRED.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
order_idYes
agent_session_idYes

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?

Annotations already cover destructive/idempotent/readOnly, but the description adds substantial new context: atomicity, the exact precondition states that gate success, escalation behavior on failure, replay semantics returning the original outcome, and a mandatory Idempotency-Key header not captured anywhere in 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.

Conciseness5/5

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

Front-loaded with the action, then layered with preconditions, escalation path, and idempotency in tight sentences. No filler; each clause adds actionable constraint information.

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?

For a destructive, precondition-gated tool with no output schema, the description covers success window, failure escalation, idempotent replay behavior, and the required header. Nothing an agent needs to call it correctly is missing.

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 0%, so the description carries full burden. It clarifies agent_session_id semantics (the order must have been placed via the same session) but says nothing about order_id's format or origin. Partial compensation for the coverage gap warrants a mid-range score.

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+resource ("Cancel an order") and scopes it to orders placed via the same agent_session_id, distinguishing it from unrelated siblings like cancel_reservation. An agent can identify the target operation 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?

Explicitly states the success window ("only succeeds while the order is still in 'pending' or 'confirmed'"), the failure condition ("once the kitchen starts preparing"), and names the alternative ("escalate to waiter_call"). This is textbook when/when-not/alternative guidance.

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