Skip to main content
Glama

Book hotel

book_hotel
Idempotent

Confirm a booking. Only call after the traveller has explicitly confirmed the hotel, dates, room, total price, cancellation policy and payment terms (set traveller_confirmed=true). Payment is collected by the property: never ask for card details. Returns the booking reference.

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": {
      "rate_key": "<rate_key>",
      "guest_name": "<guest_name>",
      "guest_email": "<guest_email>",
      "guest_phone": "<guest_phone>",
      "traveller_confirmed": "<traveller_confirmed>"
    },
    "name": "book_hotel"
  }
}

Input Schema

NameRequiredDescriptionDefault
rate_keyYesrate_key from search_hotels or check_rate (valid 30 minutes).
guest_nameYesFull name of the lead guest.
guest_emailYesGuest email; the confirmation is sent there.
guest_phoneYesGuest phone with country code, for the property.
special_requestsNoOptional requests for the property (arrival time, cot…); not guaranteed.
traveller_confirmedYestrue only after the traveller explicitly confirmed hotel, dates, room, total price, cancellation policy and payment terms.

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "additionalProperties": true,
      +  "title": "_bookDictOutput",
      +  "type": "object"
      +}
  2. Changed6 schema fields changed
    • addedInput schema / properties / guest_email / description
      Added value: +"Guest email; the confirmation is sent there."
    • addedInput schema / properties / guest_name / description
      Added value: +"Full name of the lead guest."
    • addedInput schema / properties / guest_phone / description
      Added value: +"Guest phone with country code, for the property."
    • addedInput schema / properties / rate_key / description
      Added value: +"rate_key from search_hotels or check_rate (valid 30 minutes)."
    • addedInput schema / properties / special_requests / description
      Added value: +"Optional requests for the property (arrival time, cot…); not guaranteed."
    • addedInput schema / properties / traveller_confirmed / description
      Added value: +"true only after the traveller explicitly confirmed hotel, dates, room, total price, cancellation policy and payment terms."
  3. First observed

TDQS

A3.9/5.0
Behavior4/5

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

Annotations already declare this is a non-readOnly, non-destructive, idempotent, open-world write, so the bar is lower. The description earns credit for adding real context beyond them: payment is collected by the property, card details must never be requested, and the call returns a booking reference. It does not mention that the underlying rate_key expires after 30 minutes, which is materially relevant to a booking attempt.

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 then the gate, and every clause carries a real constraint rather than filler. There is mild duplication between the confirmation list in the description and the traveller_confirmed schema text, but it is justified for a high-stakes write.

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 consequential, open-world write operation, the definition covers the confirmation gate, the payment-handling rule, and the return value; the output schema further removes the need to explain the response. The notable omission is the short validity window on rate_key, which is the main failure mode an agent could hit.

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%, so the schema already documents all six parameters, including rate_key provenance and the traveller_confirmed semantics. The description reinforces the traveller_confirmed condition but adds no new meaning about formats, precedence, or optional fields such as special_requests. 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?

Opens with a specific verb+resource ("Confirm a booking") and adds a concrete outcome ("Returns the booking reference"). An agent can distinguish this from get_hotel, cancel_booking, or check_rate on the name alone, though the description itself does not state how it differs from those siblings.

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 an explicit hard precondition: call only after the traveller has confirmed hotel, dates, room, total price, cancellation policy, and payment terms, with the flag set accordingly. It also gives a clear 'never ask for card details' exclusion, but names no alternative tool or fallback path, so it falls short of full routing 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.