Skip to main content
Glama

MenuNode

Confirm an order with the email code

confirm_order

Confirm a pending order with the 6-digit code emailed to the diner. A wrong code fails with otp_invalid (ask the diner to check it and try again); otp_expired or otp_attempts_exhausted means that code can no longer be used (place the order again with create_order to get a new one).

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

Input Schema

NameRequiredDescriptionDefault
codeYes
order_idYes

Output Schema

NameRequiredDescriptionDefault
messageYes
transferNo
confirmedYes
order_numberYes
tracking_urlYes
pickup_numberYesThe short number the restaurant calls out when a pickup order is ready (1, 2, 3... per location and local day, #588): tell it to the diner. null for a table or a delivery, until the order is confirmed (email code or online payment), once it is finished, and on older orders

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.1/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=false, idempotentHint=false, and destructiveHint=false; the description adds higher-value context the annotations cannot express — the exact failure modes (otp_invalid, otp_expired, otp_attempts_exhausted) and the recovery action for each. It does not explain what happens on a successful confirm (order state change) or whether a retry after success double-confirms, which idempotentHint=false makes relevant.

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?

Two sentences, front-loaded with the core action, and every clause carries actionable signal rather than filler. The nested parentheticals are dense but each one names a distinct error and its remedy, so nothing is wasted.

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?

With an output schema present and annotations covering the safety/identity profile, the description's remaining job is failure handling, which it handles well by mapping three error codes to concrete next actions. Only the success-path state change and retry semantics are left implicit.

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 0%, so the bare schema gives only names and types. The description compensates partially by specifying the code is a 6-digit emailed value and that order_id refers to a pending order, but adds no constraints on order_id type/format or what happens if it points to a non-pending order.

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 ('Confirm') and a specific resource ('a pending order') plus the mechanism ('6-digit code emailed to the diner'). This clearly separates it from confirm_reservation, confirm_waitlist, and create_order without the agent needing to open a schema.

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?

Usage is clear: it applies to pending orders that have an emailed code, and the description explicitly routes out to create_order when the code is otp_expired or otp_attempts_exhausted. It never states when not to use it versus confirm_reservation, but the resource scoping makes that largely unnecessary.

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.