Skip to main content
Glama

MenuNode

Confirm a reservation with the email code

confirm_reservation

Confirm a pending reservation with the 6-digit code emailed to the guest. If the same email already has a pending or confirmed booking at this location whose table time overlaps this one (lunch and dinner the same day do not), it fails with already_booked and nothing is confirmed; details carry that booking's date, time, partySize, status, confirmationCode and manageUrl. Ask the guest: change the booking they have (change_reservation with that confirmationCode; this new one is then let go on its own), or book this one too (call confirm_reservation again with the same code and confirm_additional: true). The code stays valid for that second call; do not repeat the call without confirm_additional (each try uses up one of the code's few attempts and gets the same answer). A booking the restaurant entered itself is never reported. A wrong code fails with otp_invalid (ask the guest to check it and try again); otp_expired or otp_attempts_exhausted means that code can no longer be used (book again with create_reservation 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": {
      "reservation_id": "<reservation_id>",
      "code": "<code>"
    },
    "name": "confirm_reservation"
  }
}

Input Schema

NameRequiredDescriptionDefault
codeYes
reservation_idYes
confirm_additionalNoOnly after already_booked, when the guest wants this table as well as the one they have (e.g. for another group).

Output Schema

NameRequiredDescriptionDefault
statusYes
depositYes#368: the deposit the restaurant asks to hold this booking; null = none (or, on create_reservation, not past the code yet: see deposit_amount). The guest pays the restaurant directly; only the restaurant marks it received
messageNo
confirmedYes
manage_urlYes
confirmation_codeYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.8/5.0
Behavior5/5

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

Annotations only declare the mutation profile (readOnlyHint=false, idempotentHint=false, destructiveHint=false). The description adds what the annotations cannot: the overlap rule and its lunch/dinner exception, that nothing is confirmed on failure, which fields the error details carry, that restaurant-entered bookings are never reported, the non-idempotent attempt-burning behavior of the code, and the meaning of each failure code.

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?

Purpose is front-loaded and the branch logic is ordered sensibly. There is some redundancy: the warning about repeating the call restates the attempt-exhaustion point already implied by 'each try uses up one of the code's few attempts and gets the same answer', and the long parenthetical makes one sentence hard to parse.

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 non-idempotent confirmation tool with an output schema, the definition covers the full decision tree an agent faces: success path, duplicate-booking path with remediation, and all three code-failure modes with the corrective action (create_reservation for a fresh code). Nothing needed 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.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

With only 33% schema coverage, the description has to carry weight, and it does for code ('6-digit code emailed to the guest', validity across the second call, limited attempts) and for confirm_additional (use only after already_booked, for a second table). reservation_id is never characterized beyond being part of a 'pending reservation', leaving a small gap on where the value comes from.

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 and resource ('Confirm a pending reservation') plus the mechanism ('6-digit code emailed to the guest'), which immediately separates it from create_reservation and change_reservation, both of which are named later in the text.

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?

Goes well beyond context: it tells the agent exactly what to do when already_booked comes back (ask the guest, then either change_reservation with that confirmationCode or re-call with confirm_additional: true), and explicitly warns against repeating the call without confirm_additional. Alternative paths and their triggers are enumerated rather than implied.

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.