Skip to main content
Glama

Search Hotels

search_hotels
Read-onlyIdempotent

Search candidate hotels by region, coordinates and radius, or fuzzy keyword. 普通 ToC 酒店查询可匿名,user_key 可选;下单、订单查询、取消和支付需要客户端安全配置的 user_key。 任一非 null 坐标参数会选择坐标模式,必须齐全提供经纬度与正半径;否则非空 keyword 走模糊匹配,否则必须给 region_id。区域/坐标结果已实时筛选,关键词结果仅供定位。预算最终按验价总价核对,不能用每晚参考价代替订单总价。 查询失败时先区分参数/鉴权错误和上游暂时失败:修正参数或重新授权后再调用,仅暂时失败可有限重试;不得把错误或空结果改述成成功。

Input Schema

NameRequiredDescriptionDefault
limitNo仅关键词模糊搜索生效;省略或 0 使用 20;服务端未定义最大值,负值直接交给搜索服务处理,不应传负值。区域/坐标搜索固定最多取 20 个候选再实时筛选。
adultsNo每房成人数,不是所有房间合计;相同入住配置应用于每间房。有效入住人数必须大于 0。 省略或 0 默认 1;负数无效。 仅区域/坐标搜索使用;关键词搜索忽略入住条件。
keywordNo地点或酒店名称。search_location 必填非空白文本;search_hotels 中关键词模式优先于 region_id,坐标模式优先于关键词。
childrenNo每房儿童数,非负整数;省略或 0 表示无儿童,必须等于 children_ages 数组长度。 仅区域/坐标搜索使用;关键词搜索忽略入住条件。
latitudeNo搜索中心纬度,-90 至 90 度;使用坐标模式必须同时提供 longitude 和 radius_km。
user_keyNo由可信本地客户端配置的 TourMind 用户凭证;勿让用户在聊天中粘贴。普通 ToC 查询可省略,订单/支付操作必填;OAuth 与 ToB 不接受此字段。
longitudeNo搜索中心经度,-180 至 180 度;使用坐标模式必须同时提供 latitude 和 radius_km。
radius_kmNo搜索半径,公里,必须大于 0;没有自动默认值,可显式使用 search_location 建议值。
region_idNoTourMind 区域 ID 数字字符串。没有坐标且 keyword 为空时使用区域模式;地区名称须先 search_location 解析。
room_countNo相同入住配置的房间数;业务处理器将 0 按 1 间处理,负数无效。查询工具可省略;下单工具原有 MCP Schema 要求此字段存在。 仅区域/坐标搜索使用;关键词搜索忽略入住条件。
lowest_priceNo最低预算:CNY 元的整数,全部房间、整段入住总价口径;省略或非正数不启用下限。当前候选过滤比较缓存累计单房价格,未按 room_count 折算,并不保证最终实时总价满足预算;最终必须按验价总价核对。
check_in_dateNo入住日期,YYYY-MM-DD。 省略/空字符串默认服务端当前日期的明天。 仅区域/坐标搜索使用;关键词搜索忽略入住条件。
children_agesNo每房儿童年龄数组,逐个为 0–17 岁整数;数组长度必须等于 children,同一组年龄应用于每间房。省略/null/[] 只适用于 children=0。 仅区域/坐标搜索使用;关键词搜索忽略入住条件。
highest_priceNo最高预算:CNY 元的整数,全部房间、整段入住总价口径;省略或非正数不启用上限。当前候选过滤比较缓存累计单房价格,未按 room_count 折算,并不保证最终实时总价满足预算;最终必须按验价总价核对。
location_nameNo区域或坐标中心的可读名称,用于结果范围说明,不替代 region_id/坐标。
check_out_dateNo离店日期,YYYY-MM-DD,必须晚于 check_in_date。 省略/空字符串默认入住次日。 仅区域/坐标搜索使用;关键词搜索忽略入住条件。

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed17 schema fields changed
    • changedInput schema / properties / adults / description
      Previous value: -"Number of adults in each room"New value: +"每房成人数,不是所有房间合计;相同入住配置应用于每间房。有效入住人数必须大于 0。 省略或 0 默认 1;负数无效。 仅区域/坐标搜索使用;关键词搜索忽略入住条件。"
    • changedInput schema / properties / check_in_date / description
      Previous value: -"Check-in date in YYYY-MM-DD format"New value: +"入住日期,YYYY-MM-DD。 省略/空字符串默认服务端当前日期的明天。 仅区域/坐标搜索使用;关键词搜索忽略入住条件。"
    • changedInput schema / properties / check_out_date / description
      Previous value: -"Check-out date in YYYY-MM-DD format"New value: +"离店日期,YYYY-MM-DD,必须晚于 check_in_date。 省略/空字符串默认入住次日。 仅区域/坐标搜索使用;关键词搜索忽略入住条件。"
    • changedInput schema / properties / children / description
      Previous value: -"Number of children in each room"New value: +"每房儿童数,非负整数;省略或 0 表示无儿童,必须等于 children_ages 数组长度。 仅区域/坐标搜索使用;关键词搜索忽略入住条件。"
    • changedInput schema / properties / children_ages / description
      Previous value: -"Ages of the children in each room, each from 0 to 17"New value: +"每房儿童年龄数组,逐个为 0–17 岁整数;数组长度必须等于 children,同一组年龄应用于每间房。省略/null/[] 只适用于 children=0。 仅区域/坐标搜索使用;关键词搜索忽略入住条件。"
    • changedInput schema / properties / highest_price / description
      Previous value: -"Maximum total price filter"New value: +"最高预算:CNY 元的整数,全部房间、整段入住总价口径;省略或非正数不启用上限。当前候选过滤比较缓存累计单房价格,未按 room_count 折算,并不保证最终实时总价满足预算;最终必须按验价总价核对。"
    • changedInput schema / properties / keyword / description
      Previous value: -"Hotel name or location keyword when region_id and coordinates are unavailable"New value: +"地点或酒店名称。search_location 必填非空白文本;search_hotels 中关键词模式优先于 region_id,坐标模式优先于关键词。"
    • changedInput schema / properties / latitude / description
      Previous value: -"Latitude of the search center"New value: +"搜索中心纬度,-90 至 90 度;使用坐标模式必须同时提供 longitude 和 radius_km。"
    • changedInput schema / properties / limit / description
      Previous value: -"Maximum fuzzy hotel matches"New value: +"仅关键词模糊搜索生效;省略或 0 使用 20;服务端未定义最大值,负值直接交给搜索服务处理,不应传负值。区域/坐标搜索固定最多取 20 个候选再实时筛选。"
    • changedInput schema / properties / location_name / description
      Previous value: -"Human-readable location used to describe the search scope"New value: +"区域或坐标中心的可读名称,用于结果范围说明,不替代 region_id/坐标。"
    • changedInput schema / properties / longitude / description
      Previous value: -"Longitude of the search center"New value: +"搜索中心经度,-180 至 180 度;使用坐标模式必须同时提供 latitude 和 radius_km。"
    • changedInput schema / properties / lowest_price / description
      Previous value: -"Minimum total price filter"New value: +"最低预算:CNY 元的整数,全部房间、整段入住总价口径;省略或非正数不启用下限。当前候选过滤比较缓存累计单房价格,未按 room_count 折算,并不保证最终实时总价满足预算;最终必须按验价总价核对。"
    • changedInput schema / properties / radius_km / description
      Previous value: -"Search radius in kilometers"New value: +"搜索半径,公里,必须大于 0;没有自动默认值,可显式使用 search_location 建议值。"
    • changedInput schema / properties / region_id / description
      Previous value: -"TourMind region identifier"New value: +"TourMind 区域 ID 数字字符串。没有坐标且 keyword 为空时使用区域模式;地区名称须先 search_location 解析。"
    • changedInput schema / properties / room_count / description
      Previous value: -"Number of rooms using the same occupancy"New value: +"相同入住配置的房间数;业务处理器将 0 按 1 间处理,负数无效。查询工具可省略;下单工具原有 MCP Schema 要求此字段存在。 仅区域/坐标搜索使用;关键词搜索忽略入住条件。"
    • changedInput schema / properties / user_key / description
      Previous value: -"Optional TourMind user key for authenticated ToC access"New value: +"由可信本地客户端配置的 TourMind 用户凭证;勿让用户在聊天中粘贴。普通 ToC 查询可省略,订单/支付操作必填;OAuth 与 ToB 不接受此字段。"
    • addedOutput schema / description
      Added value: +"返回字段说明(不增加校验约束;缺失、零值和 null 按各字段说明解释):\n返回值 [object] 必有字段=ok: 业务响应信封;字段缺失表示没有提供,不能自动补零。数组的 null 与 [] 都不含条目,但 null 不承诺完成了该部分查询。\n返回值.data [object] 必有字段=hotels,total: 酒店候选结果;关键词命中不表示实时有房,预算最终以验价总价核对。\n返回值.data.hotels [array]: 本次匹配酒店。\n返回值.data.hotels[]: 区域/坐标模式返回 hotel_name/min_price;模糊关键词模式返回 name/has_invrate,没有价格。\n返回值.data.hotels[] 的分支 1:\n返回值.data.hotels[] [object] 必有字段=hotel_id,hotel_name,star_rating,min_price,currency_code,distance_km: 区域/坐标模式酒店,最多 20 个候选经实时筛选。\n返回值.data.hotels[].address [string]: 地址。\n返回值.data.hotels[].address_cn [string]: 中文地址。\n返回值.data.hotels[].currency_code [string]: min_price 对应币种 ISO 4217,不保证为 CNY。\n返回值.data.hotels[].distance_km [number]: 距搜索中心距离,公里;区域搜索的零值不表示酒店就在用户位置。\n返回值.data.hotels[].hotel_id [integer]: 酒店 ID,传回工具时使用字符串。\n返回值.data.hotels[].hotel_image [string]: 酒店图片 URL。\n返回值.data.hotels[].hotel_name [string]: 酒店名称。\n返回值.data.hotels[].hotel_name_cn [string]: 中文酒店名称。\n返回值.data.hotels[].min_price [number]: 当前区域/坐标搜索经过实时筛选后的最低每房每晚参考价,currency_code 主单位;初始候选/预算筛选来自缓存,不能当成最终可下单价或全部房间整段总价。下单前必须查询并验价。\n返回值.data.hotels[].star_rating [integer]: 酒店星级;零可能表示未评级。\n返回值.data.hotels[] 的分支 2:\n返回值.data.hotels[] [object] 必有字段=hotel_id,name,has_invrate\n返回值.data.hotels[].address [string]: 酒店地址。 缺失表示本次未提供;不可自动当成零、false 或空字符串。\n返回值.data.hotels[].address_cn [string]: 中文酒店地址。 缺失表示本次未提供;不可自动当成零、false 或空字符串。\n返回值.data.hotels[].city_name [string]: 城市名称。 缺失表示本次未提供;不可自动当成零、false 或空字符串。\n返回值.data.hotels[].country [string]: 国家名称。 缺失表示本次未提供;不可自动当成零、false 或空字符串。\n返回值.data.hotels[].country_code [string]: 国家代码。 缺失表示本次未提供;不可自动当成零、false 或空字符串。\n返回值.data.hotels[].has_invrate [boolean]: 缓存中存在价格信息的标记,不代表当前实时有房或可下单。\n返回值.data.hotels[].highlights [object]: 搜索高亮片段,键为字段名,值为高亮文本。 缺失表示本次未提供;不可自动当成零、false 或空字符串。\n返回值.data.hotels[].highlights.* [string]\n返回值.data.hotels[].hotel_id [integer]: TourMind 酒店数字 ID;作为后续工具输入时用字符串。\n返回值.data.hotels[].latitude [number]: 纬度,单位度;详情返回数字字符串,搜索返回 number。 缺失表示本次未提供;不可自动当成零、false 或空字符串。\n返回值.data.hotels[].longitude [number]: 经度,单位度;详情返回数字字符串,搜索返回 number。 缺失表示本次未提供;不可自动当成零、false 或空字符串。\n返回值.data.hotels[].name [string]: 名称。\n返回值.data.hotels[].name_cn [string]: 中文名称。 缺失表示本次未提供;不可自动当成零、false 或空字符串。\n返回值.data.hotels[].region_id [string]: TourMind 地域 ID;搜索结果可能为字符串,详情为整数,以 Schema 类型为准。 缺失表示本次未提供;不可自动当成零、false 或空字符串。\n返回值.data.hotels[].region_name [string]: 地域名称。 缺失表示本次未提供;不可自动当成零、false 或空字符串。\n返回值.data.hotels[].region_name_cn [string]: 地域中文名称。 缺失表示本次未提供;不可自动当成零、false 或空字符串。\n返回值.data.hotels[].region_name_long [string]: 完整地域名称。 缺失表示本次未提供;不可自动当成零、false 或空字符串。\n返回值.data.hotels[].region_name_long_cn [string]: 完整地域中文名称。 缺失表示本次未提供;不可自动当成零、false 或空字符串。\n返回值.data.hotels[].star_rating [integer]: 酒店星级,未提供或零值不等于零星酒店。 缺失表示本次未提供;不可自动当成零、false 或空字符串。\n返回值.data.search_scope [string]: 区域或坐标搜索范围;关键词模式不返回。\n返回值.data.total [integer]: 本次返回酒店数,不是整个地区酒店总数。\n返回值.data.web_url [string]: 酒店结果浏览链接,不是价格锁定、订单或支付凭证。仅在成功签发链接时返回;有效期见 web_url_expires_at,可在有效期内重复访问。当前 MCP 不接收链接语言参数,签发语言固定 zh-CN;get_hotel_detail.language 仅控制图片查询语言。\n返回值.data.web_url_expires_at [string]: 链接到期时间,RFC3339,保留返回的 UTC 偏移;缺失表示未签发链接。\n返回值.data.web_url_one_time [boolean] 取值=[false]: 酒店浏览链接当前为 false,可重复访问直到到期;不同于支付 one_time。\n返回值.error [string]: 业务失败说明,不作为可重试或成功的唯一依据。\n返回值.error_code [string]: 鉴权等机器可读错误码,仅在错误路径提供。\n返回值.ok [boolean]: 业务是否成功。false 时读取 error/reason;工具执行错误也可能通过 MCP isError 返回而没有 structuredContent。\n返回值.reason [string] 取值=[\"invalid_request\",\"hotel_not_found\",\"upstream_timeout\",\"upstream_error\",\"hotel_detail_unavailable\"]: 失败原因:invalid_request=参数无效,hotel_not_found=酒店不存在,upstream_timeout=上游超时,upstream_error=上游失败,hotel_detail_unavailable=酒店详情不可用。成功空结果的 no_matching_live_room 位于 data.reason;批量逐项判断,不把一项失败当成整批失败。\n返回值 的分支 1:\n返回值 必有字段=data\n返回值.ok 取值=[true]\n返回值 的分支 2:\n返回值 必有字段=error,reason\n返回值.ok 取值=[false]\n"
  2. Changed4 schema fields changed
    • changedInput schema / properties / adults / description
      Previous value: -"Number of adults per room"New value: +"Number of adults in each room"
    • addedInput schema / properties / children
      Added value: +{
      +  "description": "Number of children in each room",
      +  "type": "integer"
      +}
    • addedInput schema / properties / children_ages
      Added value: +{
      +  "description": "Ages of the children in each room, each from 0 to 17",
      +  "items": {
      +    "type": "integer"
      +  },
      +  "type": [
      +    "null",
      +    "array"
      +  ]
      +}
    • changedInput schema / properties / room_count / description
      Previous value: -"Number of rooms"New value: +"Number of rooms using the same occupancy"
  3. First observed

TDQS

A4.3/5.0
Behavior4/5

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

Beyond the readOnly/idempotent/openWorld annotations it discloses that region and coordinate results are already filtered in real time whereas keyword results are only for locating, that budget filtering compares cached per-room prices and does not guarantee the final total, and that temporary upstream failures are the only retryable case. The only gap is a lack of detail on pagination or result shape.

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?

It is front-loaded with the purpose, then mode rules, then auth, then the budget caveat, then error handling; every sentence carries operative content. It is dense and slightly long, with some overlap against the schema's own descriptions, but nothing is 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?

Given a 16-parameter tool with an output schema, the description covers the mode routing, authentication requirements, budget caveat, and error-retry policy, which is everything an agent needs beyond the schema. Return values correctly need not be explained because the output schema exists.

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 already 100%, yet the description adds cross-parameter meaning the schema cannot express, such as coordinate mode being triggered by any single non-null coordinate field and keyword taking precedence over region_id while coordinates take precedence over keyword. Most individual parameter definitions remain in the schema.

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?

The first sentence names a specific verb and resource and enumerates the three search modes (region / coordinates+radius / fuzzy keyword), so an agent immediately knows what the tool does. It never names an alternative sibling by name, so the differentiation is implicit rather than explicit.

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?

It gives the exact mode-selection precedence: any non-null coordinate parameter forces coordinate mode and requires lat/lon/positive radius, otherwise a non-empty keyword triggers fuzzy matching, otherwise region_id is mandatory. It also states when user_key is required (booking/order/cancel/pay) versus optional for anonymous ToC queries, and when to retry versus fix parameters.

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.