Skip to main content
Glama

reservation.book

reservation_book

[需要登录] 体检预约:按 planId 取出项目,交给伙伴接口下单。传 contactId 时直接使用该体检人。没有 contactId 时,支持 elicitation form 的客户端先展示全部常用体检人和新建入口;选择完整联系人后直接进入协议授权,选择信息不完整的联系人时返回第二段补全表单并更新原联系人,选择新建时返回第二段表单填写姓名、手机号、与本人关系、证件类型、证件号、出生日期、性别、婚否和授权。出生日期和性别仅在非身份证时必填,服务端在提交后校验,提交后保存为常用体检人。不支持 elicitation form 的客户端返回 contactMethodRequired,用户可以选择在对话中填写或打开 H5 体检人页面,不强制跳转。选择在对话中填写后返回 contactRequired,包含待填字段和 contactDraftId;Agent 按字段逐项询问,每次只问一项,用户确认后把各字段、contactDraftId 和 consent=true 一起传回,服务端校验并保存联系人后继续预约。证件号会出现在当前对话中,可能被客户端记录;该隐私提示只向用户提示一次,提交后 Agent 不复述、不回显证件号,只引用 contactId。选择 H5 后返回 contactEntryUrl,用户添加体检人后调用 contact_list 获取 contactId,再继续预约。不要主动要求用户发送身份证号;用户已选择在对话中填写时,可以继续询问证件号。IDType 为 SFZ 时按身份证规则校验。体检项目只来自 planId,客户端不能提交项目。预约前会通过 input_required 展示本次需要的动态协议;非表单客户端返回 consentRequired,用户确认后把确认话术原文作为 consentText 传入。返回 contactId、serviceid 和 orderEntryUrl;保存联系人时同时返回 contactid 和 contactSaved,contactSaved=false 表示预约已成功但联系人保存失败。用户在 H5 用手机号登录后可看到自己的订单,并可支付、改期/取消、查看检前注意事项、查看体检报告。渠道需要用户支付时返回支付链接 payUrl 和支付提示;客户端支持 elicitation URL 时,服务端通过 URL 模式打开 payUrl,最终结果仍返回 orderEntryUrl,客户端不支持时直接返回 payUrl 和 orderEntryUrl。客户端可使用 payUrl 生成二维码展示给用户。payUrl 有效期为订单创建后 30 分钟。重复预约命中已有未支付订单时,返回原 serviceid 和该订单的 payUrl。status 表示支付状态,预约状态以 rsvStatus 为准。本体: reservation → Action: book

鉴权:需要用户登录令牌,或已经绑定用户的云市场实例凭证。未登录调用返回 401;云市场实例未绑定用户时返回 code=40003 和 data.bindUrl。

Input Schema

NameRequiredDescriptionDefault
IDTypeNo
genderNo
planIdYes
consentNo
maritalNo
payTypeNo
birthdayNo
relationNo
timespanNo
vendoridYes
contactIdNo
contactidNo
customerIDNo
consentTextNo
customerNameNo
hospitalCodeYes
contactMethodNo
contactDraftIdNo
customerMobileNo
appointmentDateYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed10 schema fields changed
    • addedInput schema / properties / birthday
      Added value: +{
      +  "type": "string"
      +}
    • addedInput schema / properties / consent
      Added value: +{
      +  "type": "boolean"
      +}
    • addedInput schema / properties / contactDraftId
      Added value: +{
      +  "type": "string"
      +}
    • addedInput schema / properties / contactMethod
      Added value: +{
      +  "type": "string"
      +}
    • addedInput schema / properties / customerID
      Added value: +{
      +  "type": "string"
      +}
    • addedInput schema / properties / customerMobile
      Added value: +{
      +  "type": "string"
      +}
    • addedInput schema / properties / customerName
      Added value: +{
      +  "type": "string"
      +}
    • addedInput schema / properties / gender
      Added value: +{
      +  "type": "string"
      +}
    • addedInput schema / properties / marital
      Added value: +{
      +  "type": "string"
      +}
    • addedInput schema / properties / relation
      Added value: +{
      +  "type": "string"
      +}
  2. Changed1 schema field changed
    • addedInput schema / properties / consentText
      Added value: +{
      +  "type": "string"
      +}
  3. First observed

TDQS

A3.9/5.0
Behavior5/5

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

No annotations exist, so the description carries the full burden and does so: it discloses auth requirements (401 for missing login, code=40003 with data.bindUrl for unbound cloud-marketplace instances), the input_required dynamic consent flow, duplicate-booking behavior (returns the original serviceid and existing payUrl), the 30-minute payUrl expiry, and the contactSaved=false partial-success case. The privacy warning about ID numbers appearing in the conversation and the instruction not to echo them back is exactly the kind of behavioral context structured fields cannot convey.

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

Conciseness2/5

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

The content is dense but delivered as one unbroken block with no headings, ordering, or line breaks, making the branching logic hard to scan. Some material is out of scope for a booking call, such as the post-booking H5 capabilities (pay, reschedule/cancel, view reports), which inflates length without helping the invocation.

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?

For a 20-parameter mutation tool with no annotations and no output schema, the description is remarkably complete: it names the return fields (contactId, serviceid, orderEntryUrl, payUrl, contactid, contactSaved), the status-vs-rsvStatus distinction, and every elicitation fallback path. The main gap is the unexplained required identifiers hospitalCode, vendorid, and appointmentDate, which an agent must guess at.

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 0% across 20 parameters, so the description must compensate and it does for the tricky ones: planId, contactId, contactDraftId, consent, consentText, IDType (SFZ validation rules), and the birthday/gender required-only-when-not-ID-card rule. However, hospitalCode, vendorid, appointmentDate, payType, timespan, customerID, customerName, and customerMobile receive no explanation at all, leaving a substantial share of parameters ambiguous.

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 opening states a specific verb and resource ('体检预约:按 planId 取出项目,交给伙伴接口下单'), so an agent knows this creates a booking from a plan. It is implicitly distinguished from reservation_cancel and reservation_modify, but those siblings are never named or contrasted, so the differentiation is inferred rather than stated.

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?

The description lays out explicit branching: use contactId directly when present; otherwise show the elicitation form picker, and fall back to contactMethodRequired/contactRequired for non-form clients. It also routes the agent to contact_list after the H5 flow. It stops short of explicitly saying when to choose this over reservation_modify/cancel, but the conditional guidance is unusually thorough.

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.

Resources