Skip to main content
Glama

Query Booking

query_booking
Read-onlyIdempotent

Query a booking owned by the authenticated account. Configure a valid TourMind user_key in a trusted local Skill or client integration that supplies the user_key tool argument. Do not ask users to paste user keys into chat. 普通 ToC 酒店查询可匿名,user_key 可选;下单、订单查询、取消和支付需要客户端安全配置的 user_key。 仅查询当前账号拥有的 TourMind 订单号;核实付款和酒店确认均使用本工具返回的状态。PENDING 表示已支付待确认,不能再次支付。 查询失败时先区分参数/鉴权错误和上游暂时失败:修正参数或重新授权后再调用,仅暂时失败可有限重试;不得把错误或空结果改述成成功。

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": {
      "user_key": "<user_key>",
      "agent_ref_id": "<agent_ref_id>"
    },
    "name": "query_booking"
  }
}

Input Schema

NameRequiredDescriptionDefault
user_keyYes由可信本地客户端配置的 TourMind 用户凭证;勿让用户在聊天中粘贴。普通 ToC 查询可省略,订单/支付操作必填;OAuth 与 ToB 不接受此字段。
agent_ref_idYescreate_booking 返回的 TourMind 订单号,必须属于当前鉴权用户;不是酒店确认号或第三方支付订单号。

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedOutput schema / description
      Previous value: -"返回字段说明(不增加校验约束;缺失、零值和 null 按各字段说明解释):\n返回值 [object] 必有字段=ok: 业务响应信封;字段缺失表示没有提供,不能自动补零。数组的 null 与 [] 都不含条目,但 null 不承诺完成了该部分查询。\n返回值.data [object] 必有字段=agent_ref_id,status,status_cn,hotel_id,hotel_name,room_type,check_in,check_out,room_count,total_price,currency,contact_name,hotel_confirmation_no,order_date: 当前账号所属订单的最新状态。\n返回值.data.agent_ref_id [string]: TourMind 订单号。\n返回值.data.check_in [string]: 入住日期 YYYY-MM-DD。\n返回值.data.check_out [string]: 离店日期 YYYY-MM-DD。\n返回值.data.contact_name [string]: 订单联系人姓名。\n返回值.data.currency [string]: 订单金额币种,ISO 4217。\n返回值.data.hotel_confirmation_no [string]: 酒店确认号;空字符串表示尚未提供,不应编造。\n返回值.data.hotel_id [integer]: 酒店 ID;传回工具时转换为字符串。\n返回值.data.hotel_name [string]: 订单酒店名称。\n返回值.data.order_date [string]: 订单创建时间 YYYY-MM-DD HH:mm:ss,接口未携带时区,不自行补 UTC。\n返回值.data.room_count [integer]: 预订房间数。\n返回值.data.room_type [string]: 预订房型。\n返回值.data.status [string] 取值=[\"UNPAID\",\"PENDING\",\"CONFIRMED\",\"CANCELLED\",\"CONFIRM_FAILED\"]: UNPAID=待支付;PENDING=待确认,不应重复支付;CONFIRMED=已确认;CANCELLED=已取消;CONFIRM_FAILED=确认失败。\n返回值.data.status_cn [string]: 订单状态中文说明。\n返回值.data.total_price [number]: 全部房间、整段入住的订单总价,使用对应币种主单位(如 CNY 元),不是分;未包含另列的 Stripe 手续费,酒店到店收取费用以政策及 exclusions 为准。\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"New value: +"返回字段说明(不增加校验约束;缺失、零值和 null 按各字段说明解释):\n返回值 [object] 必有字段=ok: 业务响应信封;字段缺失表示没有提供,不能自动补零。数组的 null 与 [] 都不含条目,但 null 不承诺完成了该部分查询。\n返回值.data [object] 必有字段=agent_ref_id,status,status_cn,hotel_id,hotel_name,room_type,check_in,check_out,room_count,total_price,currency,contact_name,hotel_confirmation_no,order_date: 当前账号所属订单的最新状态。\n返回值.data.agent_ref_id [string]: TourMind 订单号。\n返回值.data.check_in [string]: 入住日期 YYYY-MM-DD。\n返回值.data.check_out [string]: 离店日期 YYYY-MM-DD。\n返回值.data.contact_name [string]: 订单联系人姓名。\n返回值.data.coupon_usage [object|null] 必有字段=id,coupon_id,redeem_code_id,channel_order_num,channel_id,agent_code,user_name,skill_source,discount_amount,currency_code,status,expires_at,consumed_at,released_at,release_reason,created_at,updated_at: 当前选券记录;null表示没有当前记录。status为0不用券、1占用、2核销。discount_amount为币种最小单位,与外层主单位金额不同;占用到期后须核实订单,不应直接发起支付。\n返回值.data.coupon_usage.agent_code [string]\n返回值.data.coupon_usage.channel_id [integer]\n返回值.data.coupon_usage.channel_order_num [string]\n返回值.data.coupon_usage.consumed_at [null|string]\n返回值.data.coupon_usage.coupon_id [null|integer]\n返回值.data.coupon_usage.created_at [string]\n返回值.data.coupon_usage.currency_code [string]\n返回值.data.coupon_usage.discount_amount [integer]\n返回值.data.coupon_usage.expires_at [null|string]\n返回值.data.coupon_usage.id [integer]: 设施或属性标识。\n返回值.data.coupon_usage.redeem_code_id [null|integer]\n返回值.data.coupon_usage.release_reason [string]\n返回值.data.coupon_usage.released_at [null|string]\n返回值.data.coupon_usage.skill_source [string]\n返回值.data.coupon_usage.status [integer]\n返回值.data.coupon_usage.updated_at [string]\n返回值.data.coupon_usage.user_name [string]\n返回值.data.currency [string]: 订单金额币种,ISO 4217。\n返回值.data.discount_amount [number]: 整笔预订的实际优惠,currency 主单位。\n返回值.data.hotel_confirmation_no [string]: 酒店确认号;空字符串表示尚未提供,不应编造。\n返回值.data.hotel_id [integer]: 酒店 ID;传回工具时转换为字符串。\n返回值.data.hotel_name [string]: 订单酒店名称。\n返回值.data.order_date [string]: 订单创建时间 YYYY-MM-DD HH:mm:ss,接口未携带时区,不自行补 UTC。\n返回值.data.payable_amount [number]: 整笔预订券后房费,currency 主单位,不含支付手续费。\n返回值.data.room_count [integer]: 预订房间数。\n返回值.data.room_type [string]: 预订房型。\n返回值.data.status [string] 取值=[\"UNPAID\",\"PENDING\",\"CONFIRMED\",\"CANCELLED\",\"CONFIRM_FAILED\"]: UNPAID=待支付;PENDING=待确认,不应重复支付;CONFIRMED=已确认;CANCELLED=已取消;CONFIRM_FAILED=确认失败。\n返回值.data.status_cn [string]: 订单状态中文说明。\n返回值.data.total_price [number]: 全部房间、整段入住的订单总价,使用对应币种主单位(如 CNY 元),不是分;未包含另列的 Stripe 手续费,酒店到店收取费用以政策及 exclusions 为准。\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. Changed3 schema fields changed
    • changedInput schema / properties / agent_ref_id / description
      Previous value: -"TourMind booking reference"New value: +"create_booking 返回的 TourMind 订单号,必须属于当前鉴权用户;不是酒店确认号或第三方支付订单号。"
    • changedInput schema / properties / user_key / description
      Previous value: -"TourMind user key required for authenticated ToC order access"New value: +"由可信本地客户端配置的 TourMind 用户凭证;勿让用户在聊天中粘贴。普通 ToC 查询可省略,订单/支付操作必填;OAuth 与 ToB 不接受此字段。"
    • addedOutput schema / description
      Added value: +"返回字段说明(不增加校验约束;缺失、零值和 null 按各字段说明解释):\n返回值 [object] 必有字段=ok: 业务响应信封;字段缺失表示没有提供,不能自动补零。数组的 null 与 [] 都不含条目,但 null 不承诺完成了该部分查询。\n返回值.data [object] 必有字段=agent_ref_id,status,status_cn,hotel_id,hotel_name,room_type,check_in,check_out,room_count,total_price,currency,contact_name,hotel_confirmation_no,order_date: 当前账号所属订单的最新状态。\n返回值.data.agent_ref_id [string]: TourMind 订单号。\n返回值.data.check_in [string]: 入住日期 YYYY-MM-DD。\n返回值.data.check_out [string]: 离店日期 YYYY-MM-DD。\n返回值.data.contact_name [string]: 订单联系人姓名。\n返回值.data.currency [string]: 订单金额币种,ISO 4217。\n返回值.data.hotel_confirmation_no [string]: 酒店确认号;空字符串表示尚未提供,不应编造。\n返回值.data.hotel_id [integer]: 酒店 ID;传回工具时转换为字符串。\n返回值.data.hotel_name [string]: 订单酒店名称。\n返回值.data.order_date [string]: 订单创建时间 YYYY-MM-DD HH:mm:ss,接口未携带时区,不自行补 UTC。\n返回值.data.room_count [integer]: 预订房间数。\n返回值.data.room_type [string]: 预订房型。\n返回值.data.status [string] 取值=[\"UNPAID\",\"PENDING\",\"CONFIRMED\",\"CANCELLED\",\"CONFIRM_FAILED\"]: UNPAID=待支付;PENDING=待确认,不应重复支付;CONFIRMED=已确认;CANCELLED=已取消;CONFIRM_FAILED=确认失败。\n返回值.data.status_cn [string]: 订单状态中文说明。\n返回值.data.total_price [number]: 全部房间、整段入住的订单总价,使用对应币种主单位(如 CNY 元),不是分;未包含另列的 Stripe 手续费,酒店到店收取费用以政策及 exclusions 为准。\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"
  3. Changed1 schema field changed
    • changedInput schema / properties / user_key / description
      Previous value: -"TourMind user key required for authenticated ToC booking operations"New value: +"TourMind user key required for authenticated ToC order access"
  4. First observed

TDQS

A4/5.0
Behavior5/5

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

Goes well beyond the readOnly/idempotent annotations: it discloses that PENDING means paid-but-unconfirmed and must not be paid again, that payment verification and hotel confirmation should both rely on this tool's status, and that errors or empty results must not be restated as success. It also covers credential handling (configure in a trusted local client, never ask users to paste keys).

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

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

Purpose is front-loaded in the first sentence, which is good, but the paragraph is long, mixes English and Chinese, and repeats the user_key provisioning rule that the schema already states. Several sentences restate the same credential-handling constraint, diluting signal.

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?

Coverage is complete for the agent's needs: auth prerequisites, order-number semantics, status interpretation, and error/retry policy are all addressed, and an output schema exists so return structure need not be explained. The remaining gap is the absence of explicit routing to sibling tools such as cancel_booking or pay_order.

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%, and both parameters are already documented there, including the trusted-client provisioning of user_key and the fact that agent_ref_id is the create_booking order number, not a hotel confirmation or third-party payment ID. The description largely restates those points, adding only the nuance that ToC hotel queries may run anonymously. 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?

Opens with a specific verb and resource scoped to ownership: "Query a booking owned by the authenticated account." The scope constraint (only TourMind order numbers belonging to the current account) separates it implicitly from create_booking/cancel_booking/pay_order, though no sibling is named.

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?

Explicitly states when user_key is required versus optional (anonymous ToC hotel queries may omit it; ordering, order query, cancel and payment require it). It also gives a clear retry rule: fix parameters or re-authorize first, and only retry limited times on transient upstream failures. No named alternative tool is given, and no explicit 'do not use this for X' exclusion.

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.