Skip to main content
Glama

Search hotels

search_hotels
Read-only

Find hotels by name, brand, city, city code, or coordinates for check-in and check-out dates, with star, price, facility, and sort filters.

Instructions

Find hotels by query (name, brand or city), cityCode or near coordinates for checkIn/checkOut. Prices are indicative nightly floors in CNY (default) or USD: quote get_rates, not search prices. Facilities must match catalogue names. Narrow searches refused with 422. Use get_planning_guide for complex trips.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nearNo
pageNo
queryNo
sortByNorecommended
checkInYesCalendar date in YYYY-MM-DD format; checkOut must be 1–15 nights after checkIn.
starMaxNo
starMinNo
checkOutYesCalendar date in YYYY-MM-DD format; checkOut must be 1–15 nights after checkIn.
cityCodeNo
currencyNoCurrency for displayed prices: CNY or USD. Booking charges the currency returned by create_booking.CNY
pageSizeNo
priceMaxNo
priceMinNo
facilitiesNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changedv0.1.1
    • addedInput schema / properties / checkIn / description
      Added value: +"Calendar date in YYYY-MM-DD format; checkOut must be 1–15 nights after checkIn."
    • addedInput schema / properties / checkOut / description
      Added value: +"Calendar date in YYYY-MM-DD format; checkOut must be 1–15 nights after checkIn."
    • addedInput schema / properties / currency / description
      Added value: +"Currency for displayed prices: CNY or USD. Booking charges the currency returned by create_booking."
  2. First observedv0.1.0

TDQS

A4.3/5.0
Behavior4/5

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

Annotations already cover the safety profile (readOnly, non-destructive, open-world), so the description earns credit for adding semantics: search prices are indicative nightly floors, not bookable rates, and facilities must match catalogue names exactly. It stops short of describing result shape or pagination, so it is strong but not exhaustive.

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?

Dense, front-loaded, and every sentence carries a distinct payload: search modes, price caveat, facility constraint, error behavior, alternative tool. No filler and the most important routing information (search modes and the get_rates caveat) comes first.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a 14-parameter tool with a nested near object, no output schema, and low schema coverage, the description is helpful on the primary path but silent on filters (price, star, sort) and pagination behavior. With no output schema it could also hint at what a result set contains beyond indicative prices.

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 21%, so the description must carry the load and does add meaning for query, cityCode, near, facilities, and currency (CNY default vs USD). However, roughly half the parameters (priceMin/priceMax, starMin/starMax, sortBy, page/pageSize) are unexplained in both schema and description, so the compensation is partial.

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 (Find) and resource (hotels) plus the three ways to scope a search: query (name/brand/city), cityCode, or near coordinates. It implicitly separates itself from get_hotel (single hotel) and get_rates (pricing), so an agent can route without opening 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 Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicitly routes the agent: use get_rates to quote prices rather than trusting search prices, and use get_planning_guide for complex trips. It also states the failure condition ('Narrow searches refused with 422'), giving a when-not signal rather than leaving the agent to infer it.

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