Skip to main content
Glama

Purchase Hotel

purchase_hotel
Destructive

Book a hotel room by providing guest details and a rate ID from get_hotel_details. Creates a guest profile, adds the room to a cart, and initiates checkout. Returns a payment_url and an x402 payment challenge by default (USDC on Base). Set payment_service to 'coingate' to return a browser-based crypto payment URL instead. The booking is confirmed once payment settles; poll get_order_details to check status.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
emailYesGuest's email address
phoneYesGuest's phone number (e.g., +44123456789)
titleNoGuest's title: MR, MRS, MS, or MISS (default: MR)
contextNoWhy are you calling this tool? Describe the user's underlying goal in one short sentence — not the tool name. Never include names, emails, phones, or prices. Always pass this. Used for analytics only; never shown to the user.
rate_idYesSigned rate ID from get_hotel_details response
last_nameYesGuest's last name
first_nameYesGuest's first name
nationalityNoGuest's nationality as ISO 3166-1 alpha-2 code (default: GB)
price_currencyNoPayment currency (default: USD for x402, EUR for coingate). Supported: EUR, USD, GBP, PLN, CZK, HUF, SEK, NOK, DKK
payment_serviceNoPayment method: x402 (USDC on Base, default) or coingate (browser-based crypto)

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
cart_idYesPass to get_order_details to poll the booking
messageYesHow to complete payment for the chosen payment_service
payment_urlYes
booking_referenceYes

TDQS

A4.7/5.0
Behavior5/5

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

Beyond the annotations, the description discloses the full side-effect chain: creates a guest profile, adds the room to a cart, initiates checkout, returns a payment_url and x402 challenge, and only confirms once payment settles. This gives the agent a clear picture of the irreversible, state-changing nature of the call without contradicting the annotations.

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?

Three sentences, each earning its place: the core booking action, the payment method and default behavior, and the post-payment verification step. The most important information is front-loaded and there is no filler.

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 10-parameter tool with a full output schema, the description covers the complete flow: what is required, what gets created, how payment works, and how to confirm success. Nothing needed for correct invocation 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?

Schema coverage is 100%, so this dimension starts at the baseline. The description adds meaningful context for key parameters: rate_id is tied to get_hotel_details response, payment_service is clarified with x402/coingate behavior, and price_currency defaults are explained. It doesn't need to restate every schema property.

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?

The description opens with a specific verb and resource: 'Book a hotel room' using guest details and a rate ID. It clearly distinguishes itself from the read/search siblings (get_hotel_details, get_order_details, search_hotels) by describing a booking/purchase action with payment flow.

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?

The description provides clear context: it requires a rate_id from get_hotel_details, and says to poll get_order_details after payment settles. It also explains the payment_service choice between x402 and coingate. It does not explicitly state 'use this instead of search_hotels', but the booking vs. search distinction is strongly 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.

TDQS

A4.4/5.0
Disambiguation5/5

Each tool targets a distinct step in the hotel booking flow: search, view rates, purchase, and check order status. There is no meaningful overlap between any two tools, and the dependencies between them are clearly stated.

Naming Consistency5/5

All tool names follow a clear verb_noun pattern: get_hotel_details, get_order_details, purchase_hotel, search_hotels. The naming is consistent and predictable, with no mixed conventions or vague verbs.

Tool Count5/5

Four tools is a well-scoped set for a hotel booking server. Each tool serves a necessary step in the primary workflow without unnecessary duplication or bloat.

Completeness4/5

The core booking flow is covered end-to-end: search, get rates, purchase, and confirm via order status. Missing cancellation or refund capabilities are minor gaps for a booking-focused server, but the main user journey is complete.

Resources