Skip to main content
Glama

Batch Query Room Rates

batch_query_room_rates
Read-onlyIdempotent

Get live room types and rate products for multiple hotels with partial-success results. 普通 ToC 酒店查询可匿名,user_key 可选;下单、订单查询、取消和支付需要客户端安全配置的 user_key。 每批 1–20 家酒店,逐项检查 ok/data.reason/reason;只对超时等暂时失败项有限重试,不重复整批已成功项。无房属于成功空结果。 查询失败时先区分参数/鉴权错误和上游暂时失败:修正参数或重新授权后再调用,仅暂时失败可有限重试;不得把错误或空结果改述成成功。

Input Schema

NameRequiredDescriptionDefault
adultsNo每房成人数,不是所有房间合计;相同入住配置应用于每间房。有效入住人数必须大于 0。 省略或 0 默认 1;负数无效。
childrenNo每房儿童数,非负整数;省略或 0 表示无儿童,必须等于 children_ages 数组长度。
user_keyNo由可信本地客户端配置的 TourMind 用户凭证;勿让用户在聊天中粘贴。普通 ToC 查询可省略,订单/支付操作必填;OAuth 与 ToB 不接受此字段。
hotel_idsYes每批 1–20 个 TourMind 酒店 ID 字符串;输出顺序与输入相同,每项失败独立返回。
room_countNo相同入住配置的房间数;业务处理器将 0 按 1 间处理,负数无效。查询工具可省略;下单工具原有 MCP Schema 要求此字段存在。
check_in_dateNo入住日期,YYYY-MM-DD。 省略/空字符串默认服务端当前日期的明天。
children_agesNo每房儿童年龄数组,逐个为 0–17 岁整数;数组长度必须等于 children,同一组年龄应用于每间房。省略/null/[] 只适用于 children=0。
check_out_dateNo离店日期,YYYY-MM-DD,必须晚于 check_in_date。 省略/空字符串默认入住次日。

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed9 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 / hotel_ids / description
      Previous value: -"TourMind hotel identifiers to query"New value: +"每批 1–20 个 TourMind 酒店 ID 字符串;输出顺序与输入相同,每项失败独立返回。"
    • 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] 必有字段=results,summary: 逐酒店结果及汇总;外层 ok=true 仍可能有部分或全部酒店失败。\n返回值.data.results [array]: 输入顺序的酒店结果,每项独立处理。\n返回值.data.results[] [object] 必有字段=hotel_id,ok: 与输入 hotel_ids 同序的一项结果。ok=true 且 data.reason=no_matching_live_room 为成功空结果;ok=false 时返回 reason/error,省略 data。\n返回值.data.results[].data [object] 必有字段=room_types,total,stripe_payment_fee_notice: 房价查询结果。非空返回 room_types/total/手续费说明;空结果增加 reason。\n返回值.data.results[].data.reason [string] 取值=[\"no_matching_live_room\"]: 仅成功空结果出现,表示当前没有匹配的实时房价。\n返回值.data.results[].data.room_types [array]: 实时房型列表;空数组表示该入住条件下没有匹配报价。\n返回值.data.results[].data.room_types[] [object] 必有字段=name,products\n返回值.data.results[].data.room_types[].basic_room_image [string]: 房型图片 URL。 缺失表示本次未提供;不可自动当成零、false 或空字符串。\n返回值.data.results[].data.room_types[].bed_type_desc [string]: 床型说明。 缺失表示本次未提供;不可自动当成零、false 或空字符串。\n返回值.data.results[].data.room_types[].name [string]: 名称。\n返回值.data.results[].data.room_types[].name_cn [string]: 中文名称。 缺失表示本次未提供;不可自动当成零、false 或空字符串。\n返回值.data.results[].data.room_types[].products [null|array]: 按入住容量、餐食和取消政策归并的报价产品列表。\n返回值.data.results[].data.room_types[].products[] [object] 必有字段=max_occupancy,meal_type,meal_count,cancellation_policy,rate\n返回值.data.results[].data.room_types[].products[].cancellation_policy [object] 必有字段=type,effective_non_refundable: 汇总取消政策;仍须在下单前验价。\n返回值.data.results[].data.room_types[].products[].cancellation_policy.advanced_hour [integer]: 供应商取消提前小时数;以实际截止时间为准,不自行重新推算。 缺失表示本次未提供;不可自动当成零、false 或空字符串。\n返回值.data.results[].data.room_types[].products[].cancellation_policy.effective_non_refundable [boolean]: 是否已按不可退款处理,包括原不可退、缺少取消信息或截止时间已过。\n返回值.data.results[].data.room_types[].products[].cancellation_policy.free_cancel_deadline [string]: 免费取消截止时间,通常 RFC3339,按返回的时区/UTC 偏移解释,不按客户端当地时间替换;若没有时区或无法解析,不承诺免费取消。 缺失表示本次未提供;不可自动当成零、false 或空字符串。\n返回值.data.results[].data.room_types[].products[].cancellation_policy.type [string] 取值=[\"non_refundable\",\"free_cancel_before_deadline\"]: 取消类型:non_refundable=当前不可退款;free_cancel_before_deadline=截止前可免费取消。\n返回值.data.results[].data.room_types[].products[].max_occupancy [integer]: 每房成人上限,不是成人加儿童的总上限;儿童额外上限见 maxChildren。缺失表示未提供,不能按零处理;零值也不能用于推断可以无限入住,须按实际入住人数验价。\n返回值.data.results[].data.room_types[].products[].meal_count [integer]: 供应商提供的成人餐食份数,辅助解释 meal_type;零或未提供份数不能覆盖已知餐食类型,例如类型 4 仍为双早。不要据此推断儿童餐食。\n返回值.data.results[].data.room_types[].products[].meal_type [string]: 餐食类型字符串编码:1=不含餐;2=早餐(份数见 meal_count/mealCount);3=1份早餐;4=2份早餐;5=3份早餐;6=4份早餐;7=5份早餐;8=6份早餐;9=7份早餐;10=8份早餐;11=午餐;12=晚餐;13=午餐和晚餐;14=半膳(早餐加午餐或晚餐);15=全膳(早餐、午餐、晚餐);16=一价全包;17=膳食自理(厨房设施,并非自助餐);18=早餐和午餐;19=早餐和晚餐。meal_count/mealCount 补充份数,零值不能覆盖已知餐食类型;空串或未识别编码表示类型未知,不推断为不含餐。\n返回值.data.results[].data.room_types[].products[].rate [object] 必有字段=rate_code,currency,total_price,per_night_price,payment_type,is_on_request,stripe_payment_fee: 该产品最低总价对应的报价。\n返回值.data.results[].data.room_types[].products[].rate.currency [string]: 金额币种 ISO 4217。\n返回值.data.results[].data.room_types[].products[].rate.is_on_request [boolean]: true 表示需向供应商申请确认,非即时确认;false 也不表示已预留库存或已下单。\n返回值.data.results[].data.room_types[].products[].rate.payment_type [integer]: 报价支付类型:1=预付,5=到店支付;当前生成器返回 1。不是 pay_order.payment_method,不可作为支付方式调用。\n返回值.data.results[].data.room_types[].products[].rate.per_night_price [number]: 平均每房每晚价,currency 主单位;不是整段入住总价,不含另列 Stripe 手续费。\n返回值.data.results[].data.room_types[].products[].rate.rate_code [string]: 不透明报价代码,保持原样;必须用相同酒店、日期和入住人数验价后下单。\n返回值.data.results[].data.room_types[].products[].rate.stripe_payment_fee [object] 必有字段=fee_rate,fee_amount,payable_amount,currency,notice: 选择 Stripe 时另收的支付处理费用;不包含在房价总额中。\n返回值.data.results[].data.room_types[].products[].rate.stripe_payment_fee.currency [string]: 金额币种 ISO 4217。\n返回值.data.results[].data.room_types[].products[].rate.stripe_payment_fee.fee_amount [number]: Stripe 手续费金额,currency 主单位,已经按服务端精度取整。\n返回值.data.results[].data.room_types[].products[].rate.stripe_payment_fee.fee_rate [number]: 手续费比例,当前 0.035 即 3.5%。\n返回值.data.results[].data.room_types[].products[].rate.stripe_payment_fee.notice [string]: 费用来源及用途说明。\n返回值.data.results[].data.room_types[].products[].rate.stripe_payment_fee.payable_amount [number]: 订单金额加 Stripe 手续费后的实际应付总额,currency 主单位;尚未支付。\n返回值.data.results[].data.room_types[].products[].rate.total_price [number]: 全部房间、整段入住的订单总价,使用对应币种主单位(如 CNY 元),不是分;未包含另列的 Stripe 手续费,酒店到店收取费用以政策及 exclusions 为准。\n返回值.data.results[].data.room_types[].room_type_code [string]: 房型代码。 缺失表示本次未提供;不可自动当成零、false 或空字符串。\n返回值.data.results[].data.stripe_payment_fee_notice [string]: Stripe 另收手续费的说明;不代表已选择 Stripe 或已支付。\n返回值.data.results[].data.total [integer]: 返回房型数,不是产品数。空结果为 0。\n返回值.data.results[].data.web_url [string]: 酒店结果浏览链接,不是价格锁定、订单或支付凭证。仅在成功签发链接时返回;有效期见 web_url_expires_at,可在有效期内重复访问。当前 MCP 不接收链接语言参数,签发语言固定 zh-CN;get_hotel_detail.language 仅控制图片查询语言。\n返回值.data.results[].data.web_url_expires_at [string]: 链接到期时间,RFC3339,保留返回的 UTC 偏移;缺失表示未签发链接。\n返回值.data.results[].data.web_url_one_time [boolean] 取值=[false]: 酒店浏览链接当前为 false,可重复访问直到到期;不同于支付 one_time。\n返回值.data.results[].error [string]: 本酒店查询失败说明。\n返回值.data.results[].hotel_id [string]: 本项酒店 ID,与输入一致。\n返回值.data.results[].ok [boolean]: 本酒店查询是否成功,不代表有可售房。\n返回值.data.results[].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返回值.data.results[] 的分支 1:\n返回值.data.results[] 必有字段=data\n返回值.data.results[].ok 取值=[true]\n返回值.data.results[] 的分支 2:\n返回值.data.results[] 必有字段=reason,error\n返回值.data.results[].ok 取值=[false]\n返回值.data.summary [object] 必有字段=total,matched,empty,failed: 酒店计数,total=matched+empty+failed。\n返回值.data.summary.empty [integer]: 查询成功但无匹配房价的酒店数。\n返回值.data.summary.failed [integer]: 查询失败的酒店数。\n返回值.data.summary.matched [integer]: 有实时房价的酒店数。\n返回值.data.summary.total [integer]: 请求酒店数。\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. Added

TDQS

A4.1/5.0
Behavior5/5

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

Annotations already declare readOnly/openWorld/idempotent/non-destructive, and the description adds substantial context beyond them: per-item partial-success semantics (ok/data.reason/reason), no-room as a successful empty result, limited retries only for transient failures, and an explicit prohibition on restating errors or empty results as success. This is unusually rich behavioral disclosure for a read-only tool.

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?

The description is front-loaded with the verb+resource+partial-success framing before the operational rules. It is dense—mixing English and Chinese and packing auth, batching, retry, and error-handling into a few sentences—but every sentence carries operational meaning rather than 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 an 8-parameter batch query with auth nuance and partial-failure semantics, the description covers the essentials an agent needs: batching limits, auth requirements, per-item success/failure inspection, retry discipline, and no-room handling. An output schema exists so return-value detail need not be restated, and nothing critical is missing.

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 8 parameters thoroughly. The description only reinforces auth semantics around user_key (optional for ToC queries, required for order/payment operations); it adds no format or constraint detail beyond the schema. 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?

The first sentence gives a specific verb+resource ('Get live room types and rate products') plus batch scope ('multiple hotels') and a distinguishing output trait ('partial-success results'). It separates itself from single-hotel/availability siblings implicitly via 'multiple hotels' but never names query_room_rates or check_room_availability explicitly.

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?

It states concrete usage conditions: anonymous ToC queries may omit user_key while booking/order/cancel/payment require it, and batches must be 1–20 hotels. It also prescribes retry policy ('只对超时等暂时失败项有限重试,不重复整批已成功项') and distinguishes no-room from failure. It does not explicitly compare against sibling tools like query_room_rates, leaving selection partly inferred.

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.