Skip to main content
Glama

Create Booking

create_booking
Destructive

Create a hotel booking from a verified rate. 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。 先验价并让用户确认酒店、日期、每房入住人、总价/币种、餐食和取消费用,再创建订单。下单不代表支付或酒店确认;使用 query_booking 查最新状态。使用优惠券时必须先查券并确认券后金额,提供 request_id、coupon_code 和 expected_payable_amount。结果不明时重试须复用同一个 request_id 和全部原始参数;UNKNOWN/PROCESSING 不得换ID重建。FAILED_NO_ORDER 表示未创建订单,最多使用新 request_id 重试一次;若用户授权已过期或预订条款已变更,须先请用户重新确认。未提供 request_id 的旧请求仍须先核实订单,不得盲目重试。

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>",
      "hotel_id": "<hotel_id>",
      "rate_code": "<rate_code>",
      "check_in_date": "<check_in_date>",
      "check_out_date": "<check_out_date>",
      "guest_name": "<guest_name>",
      "adults": "<adults>",
      "room_count": "<room_count>",
      "currency": "<currency>",
      "total_price": "<total_price>"
    },
    "name": "create_booking"
  }
}

Input Schema

NameRequiredDescriptionDefault
roomsNo按房间分组的入住人,提供非空数组时长度必须等于有效 room_count;每房至少 1 名、最多 adults 名,优先于 guest_name。
adultsYes每房成人数,不是所有房间合计;相同入住配置应用于每间房。有效入住人数必须大于 0。 此入口不提供默认值;在使用入住条件时必须显式提供。
childrenNo每房儿童数,非负整数;省略或 0 表示无儿童,必须等于 children_ages 数组长度。
currencyYes核实报价的 ISO 4217 币种;订单实际以鉴权账号结算币种为准,本参数不改变账号币种。
hotel_idYesTourMind 酒店 ID,数字字符串;从地点/酒店搜索返回取得,不使用 Google place_id。
user_keyYes由可信本地客户端配置的 TourMind 用户凭证;勿让用户在聊天中粘贴。普通 ToC 查询可省略,订单/支付操作必填;OAuth 与 ToB 不接受此字段。
rate_codeYes不透明报价代码,原样传递;验价使用 query_room_rates 返回值,下单使用 check_room_availability 最新返回值,酒店/日期/入住人数必须一致。
guest_nameYes入住人法定全名;现有 MCP Schema 要求该字段始终存在。未提供非空 rooms 时业务处理器按本字段解析姓名;rooms 非空时优先使用其姓名。
request_idNo客户端为本次创单生成的稳定ID,最多64字节;使用优惠券时必填。相同请求重试必须复用,不得换ID重试未知结果。
room_countYes相同入住配置的房间数;业务处理器将 0 按 1 间处理,负数无效。查询工具可省略;下单工具原有 MCP Schema 要求此字段存在。
coupon_codeNoquery_available_coupons 返回的可用券码;省略表示不在创单阶段用券。
total_priceYes最新验价的全部房间、整段入住总价,currency 主单位,必须大于 0;未含另列 Stripe 手续费。价格变化须先征得用户确认。
check_in_dateYes入住日期,YYYY-MM-DD。 此入口不提供默认值;在使用入住条件时必须显式提供。
children_agesNo每房儿童年龄数组,逐个为 0–17 岁整数;数组长度必须等于 children,同一组年龄应用于每间房。省略/null/[] 只适用于 children=0。
contact_emailNo订单通知邮箱,可省略;应向用户核实,不编造。
contact_phoneNo联系手机号,可带国家码;最多 32 字节,不允许换行。可省略。
check_out_dateYes离店日期,YYYY-MM-DD,必须晚于 check_in_date。 此入口不提供默认值;在使用入住条件时必须显式提供。
expected_payable_amountNo用户已确认的券后实付金额,账号币种主单位;使用券时必填,不含另列支付手续费。

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed4 schema fields changed
    • addedInput schema / properties / coupon_code
      Added value: +{
      +  "description": "query_available_coupons 返回的可用券码;省略表示不在创单阶段用券。",
      +  "type": "string"
      +}
    • addedInput schema / properties / expected_payable_amount
      Added value: +{
      +  "description": "用户已确认的券后实付金额,账号币种主单位;使用券时必填,不含另列支付手续费。",
      +  "type": [
      +    "null",
      +    "number"
      +  ]
      +}
    • addedInput schema / properties / request_id
      Added value: +{
      +  "description": "客户端为本次创单生成的稳定ID,最多64字节;使用优惠券时必填。相同请求重试必须复用,不得换ID重试未知结果。",
      +  "type": "string"
      +}
    • changedOutput schema / description
      Previous value: -"返回字段说明(不增加校验约束;缺失、零值和 null 按各字段说明解释):\n返回值 [object] 必有字段=ok: 业务响应信封;字段缺失表示没有提供,不能自动补零。数组的 null 与 [] 都不含条目,但 null 不承诺完成了该部分查询。\n返回值.data [object] 必有字段=agent_ref_id,total_price,currency,status,message: 订单创建结果,不代表支付成功。\n返回值.data.agent_ref_id [string]: TourMind 订单号;用于后续查询、支付和取消,不是酒店确认号。\n返回值.data.currency [string]: 账号结算币种,ISO 4217。\n返回值.data.message [string]: 订单创建结果及下一步支付说明。\n返回值.data.status [string] 取值=[\"confirmed\"]: 创建接口固定返回 confirmed,不能据此认定已付款或供应商已确认;以 query_booking 状态为准。\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,total_price,currency,status,message: 订单创建结果,不代表支付成功。\n返回值.data.agent_ref_id [string]: TourMind 订单号;用于后续查询、支付和取消,不是酒店确认号。\n返回值.data.currency [string]: 账号结算币种,ISO 4217。\n返回值.data.discount_amount [number]: 整笔订单实际抵扣,币种主单位\n返回值.data.message [string]: 订单创建结果及下一步支付说明。\n返回值.data.payable_amount [number]: 券后实付,未含另列手续费\n返回值.data.request_id [string]: 创单幂等ID\n返回值.data.request_state [string]: 创单处理状态\n返回值.data.status [string] 取值=[\"confirmed\"]: 创建接口固定返回 confirmed,不能据此认定已付款或供应商已确认;以 query_booking 状态为准。\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. Changed19 schema fields changed
    • changedInput schema / properties / adults / description
      Previous value: -"Number of adults in each room"New value: +"每房成人数,不是所有房间合计;相同入住配置应用于每间房。有效入住人数必须大于 0。 此入口不提供默认值;在使用入住条件时必须显式提供。"
    • 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 / contact_email / description
      Previous value: -"Contact email for booking status notifications"New value: +"订单通知邮箱,可省略;应向用户核实,不编造。"
    • changedInput schema / properties / contact_phone / description
      Previous value: -"Contact phone including country code"New value: +"联系手机号,可带国家码;最多 32 字节,不允许换行。可省略。"
    • changedInput schema / properties / currency / description
      Previous value: -"Three-letter booking currency code"New value: +"核实报价的 ISO 4217 币种;订单实际以鉴权账号结算币种为准,本参数不改变账号币种。"
    • changedInput schema / properties / guest_name / description
      Previous value: -"Guest full legal name"New value: +"入住人法定全名;现有 MCP Schema 要求该字段始终存在。未提供非空 rooms 时业务处理器按本字段解析姓名;rooms 非空时优先使用其姓名。"
    • changedInput schema / properties / hotel_id / description
      Previous value: -"TourMind hotel identifier"New value: +"TourMind 酒店 ID,数字字符串;从地点/酒店搜索返回取得,不使用 Google place_id。"
    • changedInput schema / properties / rate_code / description
      Previous value: -"Verified rate code returned by check_room_availability"New value: +"不透明报价代码,原样传递;验价使用 query_room_rates 返回值,下单使用 check_room_availability 最新返回值,酒店/日期/入住人数必须一致。"
    • changedInput schema / properties / room_count / description
      Previous value: -"Number of rooms using the same occupancy"New value: +"相同入住配置的房间数;业务处理器将 0 按 1 间处理,负数无效。查询工具可省略;下单工具原有 MCP Schema 要求此字段存在。"
    • changedInput schema / properties / rooms / description
      Previous value: -"Named guests grouped by room; when supplied length must equal room_count"New value: +"按房间分组的入住人,提供非空数组时长度必须等于有效 room_count;每房至少 1 名、最多 adults 名,优先于 guest_name。"
    • addedInput schema / properties / rooms / items / properties / guests / description
      Added value: +"本房间入住成人名单,至少 1 名且不超过 adults;不作为儿童年龄列表。"
    • addedInput schema / properties / rooms / items / properties / guests / items / properties / firstName / description
      Added value: +"入住人证件上的名;须非空白,原始值最多 50 个 Unicode 字符,不能含控制字符。"
    • addedInput schema / properties / rooms / items / properties / guests / items / properties / lastName / description
      Added value: +"入住人证件上的姓;须非空白,原始值最多 50 个 Unicode 字符,不能含控制字符。"
    • changedInput schema / properties / total_price / description
      Previous value: -"Verified total booking price"New value: +"最新验价的全部房间、整段入住总价,currency 主单位,必须大于 0;未含另列 Stripe 手续费。价格变化须先征得用户确认。"
    • changedInput schema / properties / user_key / description
      Previous value: -"TourMind user key required for authenticated ToC booking"New value: +"由可信本地客户端配置的 TourMind 用户凭证;勿让用户在聊天中粘贴。普通 ToC 查询可省略,订单/支付操作必填;OAuth 与 ToB 不接受此字段。"
    • addedOutput schema / description
      Added value: +"返回字段说明(不增加校验约束;缺失、零值和 null 按各字段说明解释):\n返回值 [object] 必有字段=ok: 业务响应信封;字段缺失表示没有提供,不能自动补零。数组的 null 与 [] 都不含条目,但 null 不承诺完成了该部分查询。\n返回值.data [object] 必有字段=agent_ref_id,total_price,currency,status,message: 订单创建结果,不代表支付成功。\n返回值.data.agent_ref_id [string]: TourMind 订单号;用于后续查询、支付和取消,不是酒店确认号。\n返回值.data.currency [string]: 账号结算币种,ISO 4217。\n返回值.data.message [string]: 订单创建结果及下一步支付说明。\n返回值.data.status [string] 取值=[\"confirmed\"]: 创建接口固定返回 confirmed,不能据此认定已付款或供应商已确认;以 query_booking 状态为准。\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. Changed2 schema fields changed
    • addedInput schema / properties / contact_phone
      Added value: +{
      +  "description": "Contact phone including country code",
      +  "type": "string"
      +}
    • addedInput schema / properties / rooms
      Added value: +{
      +  "description": "Named guests grouped by room; when supplied length must equal room_count",
      +  "items": {
      +    "additionalProperties": false,
      +    "properties": {
      +      "guests": {
      +        "items": {
      +          "additionalProperties": false,
      +          "properties": {
      +            "firstName": {
      +              "type": "string"
      +            },
      +            "lastName": {
      +              "type": "string"
      +            }
      +          },
      +          "required": [
      +            "firstName",
      +            "lastName"
      +          ],
      +          "type": "object"
      +        },
      +        "type": [
      +          "null",
      +          "array"
      +        ]
      +      }
      +    },
      +    "required": [
      +      "guests"
      +    ],
      +    "type": "object"
      +  },
      +  "type": [
      +    "null",
      +    "array"
      +  ]
      +}
  4. 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 booking"
  5. 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"
  6. First observed

TDQS

A4.8/5.0
Behavior5/5

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

Beyond the supplied annotations (readOnlyHint=false, destructiveHint=true, openWorldHint=true), it discloses the critical behaviors: creating an order does not mean payment or hotel confirmation, idempotent retry must reuse the same request_id, UNKNOWN/PROCESSING must never be recreated with a new ID, and FAILED_NO_ORDER allows at most one retry with a new request_id. It also states the auth handling constraint that user_key must come from a trusted local client and must not be pasted into chat.

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 core action and the price-verification precondition are front-loaded, and the retry-semantics block is logically grouped. However, the user_key rule is stated in English and then restated in Chinese, and a few sentences duplicate what the schema descriptions already say, which costs some density.

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 18-parameter, 10-required mutation tool with an output schema, the description covers everything an agent needs before invoking it: auth sourcing, price verification, user confirmation, coupon prerequisites, and the full ambiguous-result retry policy. Nothing material is left for the agent to infer.

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 description coverage is 100%, so the baseline is 3, but the description adds cross-parameter meaning the schema does not: coupon use requires querying coupons first and supplying request_id, coupon_code and expected_payable_amount together, and stale authorization or changed terms require fresh user confirmation before resubmission. It adds less on individual fields like rate_code provenance, which the schema already covers well.

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?

Opens with a specific verb+resource: "Create a hotel booking from a verified rate." It immediately distinguishes itself from siblings by noting the booking is not payment or hotel confirmation and pointing to query_booking for latest status, so an agent can separate create_booking from pay_order and query_booking 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?

Gives explicit preconditions (verify price first, get user confirmation on hotel/dates/guests/total/currency/meals/cancellation fees) and explicit exclusion rules (anonymous ToC queries don't need user_key; ordering/payment do). It also spells out the coupon path (query coupons first, then supply request_id, coupon_code, expected_payable_amount) and names the alternative tool for status checks.

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.