Skip to main content
Glama

Cancel My Lunch Order

cancel_my_lunch_order
Destructive

Cancels a finalized order and refunds the charge to the wallet. Only works before order labels have been sent; after that the request is rejected and the order stands. DESTRUCTIVE - confirm with the user before cancelling. Collect each required input one at a time and confirm the details with the user before calling.

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

Input Schema

NameRequiredDescriptionDefault
order_idYesID of a finalized order - from list_my_lunch_orders; the order must still be finalized and not yet have labels sent

Output Schema

NameRequiredDescriptionDefault
idNoOrder ID
statusNoOrder status (cancelled)
refundCentsNoAmount refunded to the wallet, in cents
balanceCentsNoWallet balance after the refund, in cents

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added
  2. Removed
  3. Added

TDQS

A3.9/5.0
Behavior4/5

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

Annotations already declare destructiveHint=true and non-idempotency, so the description's job here is to add substance, which it does: refund to wallet, the label-sent precondition, and the failure semantics (request rejected, order stands). It does not cover partial-failure or refund-timing behavior, so a 4 rather than a 5.

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 action and side effect, then preconditions, then the safety instruction. There is mild redundancy between "confirm with the user before cancelling" and "confirm the details with the user before calling," which is the only thing keeping it from a 5.

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 one-parameter destructive mutation with an output schema and full annotation coverage, the description carries the necessary preconditions, safety warning, and refund semantics. Return-value detail is correctly omitted since an output schema exists; only edge-case failure behavior is absent.

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 description coverage is 100% and the single order_id parameter is already documented in the schema, including its source (list_my_lunch_orders) and validity precondition. The description adds no parameter-level meaning beyond that, so the baseline 3 applies.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

"Cancels a finalized order and refunds the charge to the wallet" gives a concrete verb, resource, and side effect, and the word "finalized" implicitly separates it from the draft-oriented siblings (discard_lunch_order_draft, pay_lunch_order_draft). It stops short of a 5 because no sibling or alternative path is named explicitly, leaving the agent to infer the draft-vs-finalized split.

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?

It states a clear operating window — works only before order labels have been sent, rejected afterwards with the order left standing — which is exactly the condition an agent needs. It also mandates user confirmation. It lacks explicit routing to alternatives (e.g., what to do when the order is still a draft), which keeps it below 5.

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