Skip to main content
Glama

create_booking

Idempotent

Book a hotel room by first retrieving the price and confirmation code, then completing the reservation after the guest approves the quoted price.

Instructions

Books a room in two steps. First call it without confirmation_code: you get the price and a code. Show the price to the user, and only if they say yes, call again with the same data and the code.

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": {
      "room_id": "<room_id>",
      "guest_name": "<guest_name>",
      "guest_email": "<guest_email>",
      "guests": "<guests>",
      "check_in": "<check_in>",
      "check_out": "<check_out>"
    },
    "name": "create_booking"
  }
}

Input Schema

NameRequiredDescriptionDefault
guestsYes
room_idYes
check_inYesYYYY-MM-DD
check_outYesYYYY-MM-DD
guest_nameYes
guest_emailYes
confirmation_codeNo

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4/5.0
Behavior4/5

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

Annotations already declare non-read-only, idempotent and non-destructive, and the description adds genuinely new behavior: the first call is a price/quote step returning a code, and the second is the actual commit gated on user consent. It does not cover code expiry, failure modes, or side effects of re-calling with mismatched data, which keeps it below 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.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Three short sentences, front-loaded with the two-step frame before the operational detail. Every sentence contributes a distinct instruction; nothing is repeated from the schema or annotations.

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?

An output schema exists, so return values need no explanation, and the description still usefully previews that the first call yields a price and code. For a 7-parameter mutation gated on user consent, the main remaining gap is what happens on the second call (confirmation result) and whether the quote code expires.

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 coverage is only 29%, so the description carries the burden. It explains the one truly ambiguous parameter (confirmation_code: omitted on the quote call, supplied on the commit call) but adds nothing about the six required fields beyond what the schema's patterns and bounds already convey.

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?

States a specific verb and resource ("Books a room") and immediately frames it as a two-step operation. It is clearly distinguishable from siblings like get_booking or cancel_booking by the booking action, though it never explicitly names an alternative for disambiguation.

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 concrete sequencing guidance: call first without confirmation_code, show the price to the user, and re-call only on approval with the same data plus the code. It stops short of naming sibling tools (e.g., check_availability) as alternatives, but the when/when-not conditions for its own two calls are explicit.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.