{
  "version": "2.0.1",
  "buildId": "1078890f1dc06d3b8935f825981548bb3311807aa61473566b6ade7d03d3380d",
  "contractHash": "323e87434e10e3ad2ff0eca180516af230635a24d488952b78409641ea987a36",
  "endpoint": "https://ai.xdkp8.com/mcp",
  "tools": [
    {
      "name": "login",
      "description": "使用用户明确提供的账号密码登录。密码为原始字符串，经 HTTPS 加密传输；AI 和客户端可能读取工具参数。不得记录或持久保存密码。返回 Token 由客户端安全保存，后续优先放 Bearer 请求头。也可选择官网 OAuth 授权。",
      "inputSchema": {
        "type": "object",
        "properties": {
          "account": {
            "type": "string",
            "maxLength": 100,
            "minLength": 1,
            "description": "商城账号，通常为注册手机号"
          },
          "password": {
            "type": "string",
            "minLength": 1,
            "maxLength": 256,
            "description": "原始账号密码，必填，非 MD5 摘要；空密码不允许"
          },
          "accessToken": {
            "type": "string",
            "minLength": 1,
            "maxLength": 8192,
            "description": "仅账号密码直登 Token 的兼容参数。优先使用 Authorization: Bearer；OAuth Token 只能放请求头。不得传官网 Token"
          }
        },
        "required": [
          "account",
          "password"
        ],
        "additionalProperties": false,
        "$schema": "http://json-schema.org/draft-07/schema#"
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "accessToken": {
            "type": "string",
            "description": "仅用于本 MCP 的访问凭证；安全保存，不放 URL 或日志"
          },
          "sessionId": {
            "type": [
              "string",
              "null"
            ],
            "default": null,
            "description": "本次 MCP 会话 ID；null 表示未提供。"
          },
          "absoluteExpiresAt": {
            "type": [
              "number",
              "null"
            ],
            "default": null,
            "description": "会话绝对到期时间，Unix 毫秒，默认最长 365 天；null 表示未提供。"
          },
          "idleTimeoutSeconds": {
            "type": [
              "number",
              "null"
            ],
            "default": null,
            "description": "不活跃到期秒数，默认 259200 秒即 72 小时；活跃请求按续期策略延长；null 表示未提供。"
          },
          "expiresIn": {
            "type": [
              "number",
              "null"
            ],
            "default": null,
            "description": "OAuth 访问 Token 到期秒数；密码直登为 null，期限由 Redis 会话控制；null 表示未提供。"
          },
          "user": {
            "type": "object",
            "properties": {
              "userId": {
                "type": "integer",
                "exclusiveMinimum": 0,
                "maximum": 9007199254740991,
                "description": "当前客户 ID，由登录状态确定"
              },
              "account": {
                "type": [
                  "string",
                  "null"
                ],
                "default": null,
                "description": "当前登录账号；null 表示未提供。"
              },
              "name": {
                "type": [
                  "string",
                  "null"
                ],
                "default": null,
                "description": "客户姓名；null 表示未提供。"
              },
              "company": {
                "type": [
                  "string",
                  "null"
                ],
                "default": null,
                "description": "客户公司；null 表示未提供。"
              },
              "channel": {
                "type": "string",
                "const": "MCP",
                "description": "登录渠道固定 MCP"
              },
              "loginMethod": {
                "type": "string",
                "enum": [
                  "PASSWORD",
                  "OAUTH"
                ],
                "description": "PASSWORD 账号密码直登；OAUTH 官网授权"
              },
              "scope": {
                "type": [
                  "string",
                  "null"
                ],
                "default": null,
                "description": "空格分隔的权限；shop:read 查询，quote:submit 提交报价，cart:write 追加、改量与删除购物车；null 表示未提供。"
              },
              "clientId": {
                "type": [
                  "string",
                  "null"
                ],
                "default": null,
                "description": "OAuth 客户端 ID；密码直登时为 null；null 表示未提供。"
              }
            },
            "required": [
              "userId",
              "channel",
              "loginMethod"
            ],
            "additionalProperties": false,
            "description": "当前客户身份和 MCP 授权范围"
          }
        },
        "required": [
          "accessToken",
          "user"
        ],
        "additionalProperties": false,
        "$schema": "http://json-schema.org/draft-07/schema#"
      },
      "title": "login",
      "annotations": {
        "readOnlyHint": false,
        "destructiveHint": false,
        "idempotentHint": false,
        "openWorldHint": false
      }
    },
    {
      "name": "get_current_user",
      "description": "获取当前 MCP 登录身份和授权范围。",
      "inputSchema": {
        "type": "object",
        "properties": {
          "accessToken": {
            "type": "string",
            "minLength": 1,
            "maxLength": 8192,
            "description": "仅账号密码直登 Token 的兼容参数。优先使用 Authorization: Bearer；OAuth Token 只能放请求头。不得传官网 Token"
          }
        },
        "additionalProperties": false,
        "$schema": "http://json-schema.org/draft-07/schema#"
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "userId": {
            "type": "integer",
            "exclusiveMinimum": 0,
            "maximum": 9007199254740991,
            "description": "当前客户 ID，由登录状态确定"
          },
          "account": {
            "type": [
              "string",
              "null"
            ],
            "default": null,
            "description": "当前登录账号；null 表示未提供。"
          },
          "name": {
            "type": [
              "string",
              "null"
            ],
            "default": null,
            "description": "客户姓名；null 表示未提供。"
          },
          "company": {
            "type": [
              "string",
              "null"
            ],
            "default": null,
            "description": "客户公司；null 表示未提供。"
          },
          "channel": {
            "type": "string",
            "const": "MCP",
            "description": "登录渠道固定 MCP"
          },
          "loginMethod": {
            "type": "string",
            "enum": [
              "PASSWORD",
              "OAUTH"
            ],
            "description": "PASSWORD 账号密码直登；OAUTH 官网授权"
          },
          "scope": {
            "type": [
              "string",
              "null"
            ],
            "default": null,
            "description": "空格分隔的权限；shop:read 查询，quote:submit 提交报价，cart:write 追加、改量与删除购物车；null 表示未提供。"
          },
          "clientId": {
            "type": [
              "string",
              "null"
            ],
            "default": null,
            "description": "OAuth 客户端 ID；密码直登时为 null；null 表示未提供。"
          }
        },
        "required": [
          "userId",
          "channel",
          "loginMethod"
        ],
        "additionalProperties": false,
        "$schema": "http://json-schema.org/draft-07/schema#"
      },
      "title": "get_current_user",
      "annotations": {
        "readOnlyHint": true,
        "destructiveHint": false,
        "idempotentHint": true,
        "openWorldHint": false
      }
    },
    {
      "name": "logout",
      "description": "退出当前 MCP 会话并撤销该会话授权。",
      "inputSchema": {
        "type": "object",
        "properties": {
          "accessToken": {
            "type": "string",
            "minLength": 1,
            "maxLength": 8192,
            "description": "仅账号密码直登 Token 的兼容参数。优先使用 Authorization: Bearer；OAuth Token 只能放请求头。不得传官网 Token"
          }
        },
        "additionalProperties": false,
        "$schema": "http://json-schema.org/draft-07/schema#"
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "loggedOut": {
            "type": "boolean",
            "description": "是否已退出"
          }
        },
        "required": [
          "loggedOut"
        ],
        "additionalProperties": false,
        "$schema": "http://json-schema.org/draft-07/schema#"
      },
      "title": "logout",
      "annotations": {
        "readOnlyHint": false,
        "destructiveHint": true,
        "idempotentHint": true,
        "openWorldHint": false
      }
    },
    {
      "name": "list_orders",
      "description": "只读查询当前客户的订单，合并支付记录通过 orderList 展开。",
      "inputSchema": {
        "type": "object",
        "properties": {
          "pageNum": {
            "type": "integer",
            "minimum": 1,
            "maximum": 100000,
            "default": 1,
            "description": "页码，从 1 开始，默认 1"
          },
          "pageSize": {
            "type": "integer",
            "minimum": 1,
            "maximum": 100,
            "default": 20,
            "description": "每页条数，1–100，默认 20"
          },
          "beginDate": {
            "type": "string",
            "format": "date",
            "description": "开始日期；有效日历日期 YYYY-MM-DD，按北京时间整日过滤"
          },
          "endDate": {
            "type": "string",
            "format": "date",
            "description": "结束日期；有效日历日期 YYYY-MM-DD，按北京时间整日过滤"
          },
          "accessToken": {
            "type": "string",
            "minLength": 1,
            "maxLength": 8192,
            "description": "仅账号密码直登 Token 的兼容参数。优先使用 Authorization: Bearer；OAuth Token 只能放请求头。不得传官网 Token"
          }
        },
        "additionalProperties": false,
        "$schema": "http://json-schema.org/draft-07/schema#"
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "list": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": [
                    "number",
                    "null"
                  ],
                  "default": null,
                  "description": "订单 ID，需与订单类型一起使用；null 表示未提供。"
                },
                "number": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "default": null,
                  "description": "订单编号；null 表示未提供。"
                },
                "type": {
                  "type": [
                    "number",
                    "null"
                  ],
                  "default": null,
                  "description": "订单详情类型：1 临时单，2 销售单，3 物流费，4 销售退单；集合行可能为空，应展开 orderList；null 表示未提供。"
                },
                "createTime": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "default": null,
                  "description": "创建时间，北京时间；null 表示未提供。"
                },
                "paystate": {
                  "type": [
                    "number",
                    "null"
                  ],
                  "default": null,
                  "description": "商城支付状态码：1 待支付，2 支付成功，3 月结未支付，4 月结已支付，5 订单关闭或支付失败；null 表示未提供。"
                },
                "orderstate": {
                  "type": [
                    "number",
                    "null"
                  ],
                  "default": null,
                  "description": "原商城订单状态：销售单 0 待分拣、1 分拣、2 待出货、3 配送、4 到货、7 调货完成；临时单 1 待支付、2 关闭、3 已付款；物流或退单可能不提供；null 表示未提供。"
                },
                "totalAmount": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "default": null,
                  "description": "订单总金额；十进制字符串，金额单位人民币元，保留商城精度；null 表示未提供。"
                },
                "shouldMoney": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "default": null,
                  "description": "应收金额；十进制字符串，金额单位人民币元，保留商城精度；null 表示未提供。"
                },
                "returnMoney": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "default": null,
                  "description": "退货金额；十进制字符串，金额单位人民币元，保留商城精度；null 表示未提供。"
                },
                "remark": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "default": null,
                  "description": "订单备注；null 表示未提供。"
                },
                "sendee": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "default": null,
                  "description": "收货人；null 表示未提供。"
                },
                "phone": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "default": null,
                  "description": "收货电话；null 表示未提供。"
                },
                "sendAddress": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "default": null,
                  "description": "配送地址；null 表示未提供。"
                },
                "expressCompany": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "default": null,
                  "description": "配送公司；null 表示未提供。"
                },
                "expressNumber": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "default": null,
                  "description": "物流单号；null 表示未提供。"
                },
                "goodsList": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "gId": {
                        "anyOf": [
                          {
                            "type": "integer",
                            "minimum": 1,
                            "maximum": 2147483647
                          },
                          {
                            "type": "null"
                          }
                        ],
                        "default": null,
                        "description": "商品 SKU ID；整数可直接传 get_goods_detail，null 表示未提供"
                      },
                      "goodsInfo": {
                        "type": [
                          "string",
                          "null"
                        ],
                        "default": null,
                        "description": "订单商品描述；null 表示未提供。"
                      },
                      "norm": {
                        "type": [
                          "string",
                          "null"
                        ],
                        "default": null,
                        "description": "规格；null 表示未提供。"
                      },
                      "brand": {
                        "type": [
                          "string",
                          "null"
                        ],
                        "default": null,
                        "description": "品牌；null 表示未提供。"
                      },
                      "unit": {
                        "type": [
                          "string",
                          "null"
                        ],
                        "default": null,
                        "description": "订单单位；null 表示未提供。"
                      },
                      "goodsNum": {
                        "type": [
                          "string",
                          "null"
                        ],
                        "default": null,
                        "description": "订单商品数量；null 表示未提供。"
                      },
                      "price": {
                        "type": [
                          "string",
                          "null"
                        ],
                        "default": null,
                        "description": "订单单价；十进制字符串，金额单位人民币元，保留商城精度；null 表示未提供。"
                      },
                      "totalmoney": {
                        "type": [
                          "string",
                          "null"
                        ],
                        "default": null,
                        "description": "商品行金额；十进制字符串，金额单位人民币元，保留商城精度；null 表示未提供。"
                      },
                      "returnQuantity": {
                        "type": [
                          "string",
                          "null"
                        ],
                        "default": null,
                        "description": "已退数量；null 表示未提供。"
                      }
                    },
                    "additionalProperties": false
                  },
                  "default": [],
                  "description": "订单商品明细"
                },
                "orderList": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": [
                          "number",
                          "null"
                        ],
                        "default": null,
                        "description": "订单 ID，需与订单类型一起使用；null 表示未提供。"
                      },
                      "number": {
                        "type": [
                          "string",
                          "null"
                        ],
                        "default": null,
                        "description": "订单编号；null 表示未提供。"
                      },
                      "type": {
                        "type": [
                          "number",
                          "null"
                        ],
                        "default": null,
                        "description": "订单详情类型：1 临时单，2 销售单，3 物流费，4 销售退单；集合行可能为空，应展开 orderList；null 表示未提供。"
                      },
                      "createTime": {
                        "type": [
                          "string",
                          "null"
                        ],
                        "default": null,
                        "description": "创建时间，北京时间；null 表示未提供。"
                      },
                      "paystate": {
                        "type": [
                          "number",
                          "null"
                        ],
                        "default": null,
                        "description": "商城支付状态码：1 待支付，2 支付成功，3 月结未支付，4 月结已支付，5 订单关闭或支付失败；null 表示未提供。"
                      },
                      "orderstate": {
                        "type": [
                          "number",
                          "null"
                        ],
                        "default": null,
                        "description": "原商城订单状态：销售单 0 待分拣、1 分拣、2 待出货、3 配送、4 到货、7 调货完成；临时单 1 待支付、2 关闭、3 已付款；物流或退单可能不提供；null 表示未提供。"
                      },
                      "totalAmount": {
                        "type": [
                          "string",
                          "null"
                        ],
                        "default": null,
                        "description": "订单总金额；十进制字符串，金额单位人民币元，保留商城精度；null 表示未提供。"
                      },
                      "shouldMoney": {
                        "type": [
                          "string",
                          "null"
                        ],
                        "default": null,
                        "description": "应收金额；十进制字符串，金额单位人民币元，保留商城精度；null 表示未提供。"
                      },
                      "returnMoney": {
                        "type": [
                          "string",
                          "null"
                        ],
                        "default": null,
                        "description": "退货金额；十进制字符串，金额单位人民币元，保留商城精度；null 表示未提供。"
                      },
                      "remark": {
                        "type": [
                          "string",
                          "null"
                        ],
                        "default": null,
                        "description": "订单备注；null 表示未提供。"
                      },
                      "sendee": {
                        "type": [
                          "string",
                          "null"
                        ],
                        "default": null,
                        "description": "收货人；null 表示未提供。"
                      },
                      "phone": {
                        "type": [
                          "string",
                          "null"
                        ],
                        "default": null,
                        "description": "收货电话；null 表示未提供。"
                      },
                      "sendAddress": {
                        "type": [
                          "string",
                          "null"
                        ],
                        "default": null,
                        "description": "配送地址；null 表示未提供。"
                      },
                      "expressCompany": {
                        "type": [
                          "string",
                          "null"
                        ],
                        "default": null,
                        "description": "配送公司；null 表示未提供。"
                      },
                      "expressNumber": {
                        "type": [
                          "string",
                          "null"
                        ],
                        "default": null,
                        "description": "物流单号；null 表示未提供。"
                      },
                      "goodsList": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "gId": {
                              "anyOf": [
                                {
                                  "type": "integer",
                                  "minimum": 1,
                                  "maximum": 2147483647
                                },
                                {
                                  "type": "null"
                                }
                              ],
                              "default": null,
                              "description": "商品 SKU ID；整数可直接传 get_goods_detail，null 表示未提供"
                            },
                            "goodsInfo": {
                              "type": [
                                "string",
                                "null"
                              ],
                              "default": null,
                              "description": "订单商品描述；null 表示未提供。"
                            },
                            "norm": {
                              "type": [
                                "string",
                                "null"
                              ],
                              "default": null,
                              "description": "规格；null 表示未提供。"
                            },
                            "brand": {
                              "type": [
                                "string",
                                "null"
                              ],
                              "default": null,
                              "description": "品牌；null 表示未提供。"
                            },
                            "unit": {
                              "type": [
                                "string",
                                "null"
                              ],
                              "default": null,
                              "description": "订单单位；null 表示未提供。"
                            },
                            "goodsNum": {
                              "type": [
                                "string",
                                "null"
                              ],
                              "default": null,
                              "description": "订单商品数量；null 表示未提供。"
                            },
                            "price": {
                              "type": [
                                "string",
                                "null"
                              ],
                              "default": null,
                              "description": "订单单价；十进制字符串，金额单位人民币元，保留商城精度；null 表示未提供。"
                            },
                            "totalmoney": {
                              "type": [
                                "string",
                                "null"
                              ],
                              "default": null,
                              "description": "商品行金额；十进制字符串，金额单位人民币元，保留商城精度；null 表示未提供。"
                            },
                            "returnQuantity": {
                              "type": [
                                "string",
                                "null"
                              ],
                              "default": null,
                              "description": "已退数量；null 表示未提供。"
                            }
                          },
                          "additionalProperties": false
                        },
                        "default": [],
                        "description": "订单商品明细"
                      }
                    },
                    "additionalProperties": false
                  },
                  "default": [],
                  "description": "合并支付行中的子订单；详情使用子订单 ID 和类型"
                }
              },
              "additionalProperties": false
            },
            "default": [],
            "description": "本页订单或合并支付行"
          },
          "total": {
            "type": [
              "number",
              "null"
            ],
            "default": null,
            "description": "订单列表总行数；null 表示未提供。"
          }
        },
        "additionalProperties": false,
        "$schema": "http://json-schema.org/draft-07/schema#"
      },
      "title": "list_orders",
      "annotations": {
        "readOnlyHint": true,
        "destructiveHint": false,
        "idempotentHint": true,
        "openWorldHint": false
      }
    },
    {
      "name": "get_order_detail",
      "description": "只读查询当前客户的一张订单，不支持下单或支付。",
      "inputSchema": {
        "type": "object",
        "properties": {
          "orderId": {
            "type": "integer",
            "exclusiveMinimum": 0,
            "maximum": 9007199254740991,
            "description": "订单 ID"
          },
          "type": {
            "type": "number",
            "enum": [
              1,
              2,
              3,
              4
            ],
            "description": "1 临时单；2 销售单；3 物流费；4 销售退单"
          },
          "accessToken": {
            "type": "string",
            "minLength": 1,
            "maxLength": 8192,
            "description": "仅账号密码直登 Token 的兼容参数。优先使用 Authorization: Bearer；OAuth Token 只能放请求头。不得传官网 Token"
          }
        },
        "required": [
          "orderId",
          "type"
        ],
        "additionalProperties": false,
        "$schema": "http://json-schema.org/draft-07/schema#"
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "type": {
            "type": [
              "number",
              "null"
            ],
            "default": null,
            "description": "本次详情类型；null 表示未提供。"
          },
          "summary": {
            "type": "object",
            "properties": {
              "id": {
                "type": [
                  "number",
                  "null"
                ],
                "default": null,
                "description": "订单 ID，需与订单类型一起使用；null 表示未提供。"
              },
              "number": {
                "type": [
                  "string",
                  "null"
                ],
                "default": null,
                "description": "订单编号；null 表示未提供。"
              },
              "type": {
                "type": [
                  "number",
                  "null"
                ],
                "default": null,
                "description": "订单详情类型：1 临时单，2 销售单，3 物流费，4 销售退单；集合行可能为空，应展开 orderList；null 表示未提供。"
              },
              "createTime": {
                "type": [
                  "string",
                  "null"
                ],
                "default": null,
                "description": "创建时间，北京时间；null 表示未提供。"
              },
              "paystate": {
                "type": [
                  "number",
                  "null"
                ],
                "default": null,
                "description": "商城支付状态码：1 待支付，2 支付成功，3 月结未支付，4 月结已支付，5 订单关闭或支付失败；null 表示未提供。"
              },
              "orderstate": {
                "type": [
                  "number",
                  "null"
                ],
                "default": null,
                "description": "原商城订单状态：销售单 0 待分拣、1 分拣、2 待出货、3 配送、4 到货、7 调货完成；临时单 1 待支付、2 关闭、3 已付款；物流或退单可能不提供；null 表示未提供。"
              },
              "totalAmount": {
                "type": [
                  "string",
                  "null"
                ],
                "default": null,
                "description": "订单总金额；十进制字符串，金额单位人民币元，保留商城精度；null 表示未提供。"
              },
              "shouldMoney": {
                "type": [
                  "string",
                  "null"
                ],
                "default": null,
                "description": "应收金额；十进制字符串，金额单位人民币元，保留商城精度；null 表示未提供。"
              },
              "returnMoney": {
                "type": [
                  "string",
                  "null"
                ],
                "default": null,
                "description": "退货金额；十进制字符串，金额单位人民币元，保留商城精度；null 表示未提供。"
              },
              "remark": {
                "type": [
                  "string",
                  "null"
                ],
                "default": null,
                "description": "订单备注；null 表示未提供。"
              },
              "sendee": {
                "type": [
                  "string",
                  "null"
                ],
                "default": null,
                "description": "收货人；null 表示未提供。"
              },
              "phone": {
                "type": [
                  "string",
                  "null"
                ],
                "default": null,
                "description": "收货电话；null 表示未提供。"
              },
              "sendAddress": {
                "type": [
                  "string",
                  "null"
                ],
                "default": null,
                "description": "配送地址；null 表示未提供。"
              },
              "expressCompany": {
                "type": [
                  "string",
                  "null"
                ],
                "default": null,
                "description": "配送公司；null 表示未提供。"
              },
              "expressNumber": {
                "type": [
                  "string",
                  "null"
                ],
                "default": null,
                "description": "物流单号；null 表示未提供。"
              },
              "goodsList": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "gId": {
                      "anyOf": [
                        {
                          "type": "integer",
                          "minimum": 1,
                          "maximum": 2147483647
                        },
                        {
                          "type": "null"
                        }
                      ],
                      "default": null,
                      "description": "商品 SKU ID；整数可直接传 get_goods_detail，null 表示未提供"
                    },
                    "goodsInfo": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "default": null,
                      "description": "订单商品描述；null 表示未提供。"
                    },
                    "norm": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "default": null,
                      "description": "规格；null 表示未提供。"
                    },
                    "brand": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "default": null,
                      "description": "品牌；null 表示未提供。"
                    },
                    "unit": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "default": null,
                      "description": "订单单位；null 表示未提供。"
                    },
                    "goodsNum": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "default": null,
                      "description": "订单商品数量；null 表示未提供。"
                    },
                    "price": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "default": null,
                      "description": "订单单价；十进制字符串，金额单位人民币元，保留商城精度；null 表示未提供。"
                    },
                    "totalmoney": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "default": null,
                      "description": "商品行金额；十进制字符串，金额单位人民币元，保留商城精度；null 表示未提供。"
                    },
                    "returnQuantity": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "default": null,
                      "description": "已退数量；null 表示未提供。"
                    }
                  },
                  "additionalProperties": false
                },
                "default": [],
                "description": "订单商品明细"
              }
            },
            "additionalProperties": false,
            "description": "订单摘要"
          },
          "goodsList": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "gId": {
                  "anyOf": [
                    {
                      "type": "integer",
                      "minimum": 1,
                      "maximum": 2147483647
                    },
                    {
                      "type": "null"
                    }
                  ],
                  "default": null,
                  "description": "商品 SKU ID；整数可直接传 get_goods_detail，null 表示未提供"
                },
                "goodsInfo": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "default": null,
                  "description": "订单商品描述；null 表示未提供。"
                },
                "norm": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "default": null,
                  "description": "规格；null 表示未提供。"
                },
                "brand": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "default": null,
                  "description": "品牌；null 表示未提供。"
                },
                "unit": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "default": null,
                  "description": "订单单位；null 表示未提供。"
                },
                "goodsNum": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "default": null,
                  "description": "订单商品数量；null 表示未提供。"
                },
                "price": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "default": null,
                  "description": "订单单价；十进制字符串，金额单位人民币元，保留商城精度；null 表示未提供。"
                },
                "totalmoney": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "default": null,
                  "description": "商品行金额；十进制字符串，金额单位人民币元，保留商城精度；null 表示未提供。"
                },
                "returnQuantity": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "default": null,
                  "description": "已退数量；null 表示未提供。"
                }
              },
              "additionalProperties": false
            },
            "default": [],
            "description": "订单商品明细"
          }
        },
        "required": [
          "summary"
        ],
        "additionalProperties": false,
        "$schema": "http://json-schema.org/draft-07/schema#"
      },
      "title": "get_order_detail",
      "annotations": {
        "readOnlyHint": true,
        "destructiveHint": false,
        "idempotentHint": true,
        "openWorldHint": false
      }
    },
    {
      "name": "list_addresses",
      "description": "只读获取当前客户的收货地址列表；无新增、修改、删除或设置默认功能。",
      "inputSchema": {
        "type": "object",
        "properties": {
          "accessToken": {
            "type": "string",
            "minLength": 1,
            "maxLength": 8192,
            "description": "仅账号密码直登 Token 的兼容参数。优先使用 Authorization: Bearer；OAuth Token 只能放请求头。不得传官网 Token"
          }
        },
        "additionalProperties": false,
        "$schema": "http://json-schema.org/draft-07/schema#"
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "integer",
                  "exclusiveMinimum": 0,
                  "maximum": 9007199254740991,
                  "description": "收货地址 ID"
                },
                "area": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "default": null,
                  "description": "省市区；null 表示未提供。"
                },
                "detailAddress": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "default": null,
                  "description": "详细地址；null 表示未提供。"
                },
                "consignee": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "default": null,
                  "description": "收货人；null 表示未提供。"
                },
                "phone": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "default": null,
                  "description": "收货联系电话；null 表示未提供。"
                },
                "isDefault": {
                  "type": [
                    "number",
                    "null"
                  ],
                  "default": null,
                  "description": "默认地址标志：1 默认，0 非默认；null 表示未提供。"
                },
                "customName": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "default": null,
                  "description": "地址自定义名称；null 表示未提供。"
                }
              },
              "required": [
                "id"
              ],
              "additionalProperties": false
            },
            "default": [],
            "description": "收货地址列表"
          }
        },
        "additionalProperties": false,
        "$schema": "http://json-schema.org/draft-07/schema#"
      },
      "title": "list_addresses",
      "annotations": {
        "readOnlyHint": true,
        "destructiveHint": false,
        "idempotentHint": true,
        "openWorldHint": false
      }
    },
    {
      "name": "get_address",
      "description": "只读获取当前客户的一条收货地址。",
      "inputSchema": {
        "type": "object",
        "properties": {
          "addressId": {
            "type": "integer",
            "exclusiveMinimum": 0,
            "maximum": 9007199254740991,
            "description": "地址 ID"
          },
          "accessToken": {
            "type": "string",
            "minLength": 1,
            "maxLength": 8192,
            "description": "仅账号密码直登 Token 的兼容参数。优先使用 Authorization: Bearer；OAuth Token 只能放请求头。不得传官网 Token"
          }
        },
        "required": [
          "addressId"
        ],
        "additionalProperties": false,
        "$schema": "http://json-schema.org/draft-07/schema#"
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "exclusiveMinimum": 0,
            "maximum": 9007199254740991,
            "description": "收货地址 ID"
          },
          "area": {
            "type": [
              "string",
              "null"
            ],
            "default": null,
            "description": "省市区；null 表示未提供。"
          },
          "detailAddress": {
            "type": [
              "string",
              "null"
            ],
            "default": null,
            "description": "详细地址；null 表示未提供。"
          },
          "consignee": {
            "type": [
              "string",
              "null"
            ],
            "default": null,
            "description": "收货人；null 表示未提供。"
          },
          "phone": {
            "type": [
              "string",
              "null"
            ],
            "default": null,
            "description": "收货联系电话；null 表示未提供。"
          },
          "isDefault": {
            "type": [
              "number",
              "null"
            ],
            "default": null,
            "description": "默认地址标志：1 默认，0 非默认；null 表示未提供。"
          },
          "customName": {
            "type": [
              "string",
              "null"
            ],
            "default": null,
            "description": "地址自定义名称；null 表示未提供。"
          }
        },
        "required": [
          "id"
        ],
        "additionalProperties": false,
        "$schema": "http://json-schema.org/draft-07/schema#"
      },
      "title": "get_address",
      "annotations": {
        "readOnlyHint": true,
        "destructiveHint": false,
        "idempotentHint": true,
        "openWorldHint": false
      }
    },
    {
      "name": "list_invoices",
      "description": "只读获取当前客户的开票记录，不提交开票申请。",
      "inputSchema": {
        "type": "object",
        "properties": {
          "pageNum": {
            "type": "integer",
            "minimum": 1,
            "maximum": 100000,
            "default": 1,
            "description": "页码，从 1 开始，默认 1"
          },
          "pageSize": {
            "type": "integer",
            "minimum": 1,
            "maximum": 100,
            "default": 20,
            "description": "每页条数，1–100，默认 20"
          },
          "beginTime": {
            "type": "string",
            "format": "date",
            "description": "关联单据开始日期；有效日历日期 YYYY-MM-DD，按北京时间整日过滤"
          },
          "endTime": {
            "type": "string",
            "format": "date",
            "description": "关联单据结束日期；有效日历日期 YYYY-MM-DD，按北京时间整日过滤"
          },
          "invoiceStatus": {
            "type": "integer",
            "minimum": 1,
            "maximum": 4,
            "description": "1 申请中，2 已开票，3 已红冲，4 已开红票；省略查询全部"
          },
          "invoiceNumber": {
            "type": "string",
            "maxLength": 500,
            "description": "精确发票号码"
          },
          "orderNumber": {
            "type": "string",
            "maxLength": 500,
            "description": "关联单号关键词"
          },
          "accessToken": {
            "type": "string",
            "minLength": 1,
            "maxLength": 8192,
            "description": "仅账号密码直登 Token 的兼容参数。优先使用 Authorization: Bearer；OAuth Token 只能放请求头。不得传官网 Token"
          }
        },
        "additionalProperties": false,
        "$schema": "http://json-schema.org/draft-07/schema#"
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "list": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "invoiceId": {
                  "type": "integer",
                  "exclusiveMinimum": 0,
                  "maximum": 9007199254740991,
                  "description": "发票记录 ID"
                },
                "clientCompany": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "default": null,
                  "description": "开票公司；null 表示未提供。"
                },
                "invoiceAmount": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "default": null,
                  "description": "开票金额；红冲可为负数；十进制字符串，金额单位人民币元，保留商城精度；null 表示未提供。"
                },
                "invoiceStatus": {
                  "type": [
                    "number",
                    "null"
                  ],
                  "default": null,
                  "description": "发票状态：1 申请中，2 已开票，3 已红冲，4 已开红票；null 表示未提供。"
                },
                "invoiceStatusValue": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "default": null,
                  "description": "发票状态中文名称；null 表示未提供。"
                },
                "category": {
                  "type": [
                    "number",
                    "null"
                  ],
                  "default": null,
                  "description": "发票类别：1 纸质，2 数电；null 表示未提供。"
                },
                "categoryValue": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "default": null,
                  "description": "发票类别名称；null 表示未提供。"
                },
                "applyTime": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "default": null,
                  "description": "申请时间，北京时间；null 表示未提供。"
                },
                "confirmTime": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "default": null,
                  "description": "开票时间，北京时间；null 表示未提供。"
                },
                "numbers": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "default": null,
                  "description": "发票号码；null 表示未提供。"
                }
              },
              "required": [
                "invoiceId"
              ],
              "additionalProperties": false
            },
            "default": [],
            "description": "开票记录"
          },
          "total": {
            "type": [
              "number",
              "null"
            ],
            "default": null,
            "description": "总条数；null 表示未提供。"
          }
        },
        "additionalProperties": false,
        "$schema": "http://json-schema.org/draft-07/schema#"
      },
      "title": "list_invoices",
      "annotations": {
        "readOnlyHint": true,
        "destructiveHint": false,
        "idempotentHint": true,
        "openWorldHint": false
      }
    },
    {
      "name": "get_invoice_detail",
      "description": "只读获取当前客户发票及其关联单据。",
      "inputSchema": {
        "type": "object",
        "properties": {
          "invoiceId": {
            "type": "integer",
            "exclusiveMinimum": 0,
            "maximum": 9007199254740991,
            "description": "发票记录 ID"
          },
          "category": {
            "type": "number",
            "enum": [
              1,
              2
            ],
            "description": "1 纸质发票，2 数电发票，沿用列表返回值"
          },
          "accessToken": {
            "type": "string",
            "minLength": 1,
            "maxLength": 8192,
            "description": "仅账号密码直登 Token 的兼容参数。优先使用 Authorization: Bearer；OAuth Token 只能放请求头。不得传官网 Token"
          }
        },
        "required": [
          "invoiceId",
          "category"
        ],
        "additionalProperties": false,
        "$schema": "http://json-schema.org/draft-07/schema#"
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "invoiceId": {
            "type": "integer",
            "exclusiveMinimum": 0,
            "maximum": 9007199254740991,
            "description": "发票记录 ID"
          },
          "clientCompany": {
            "type": [
              "string",
              "null"
            ],
            "default": null,
            "description": "开票公司；null 表示未提供。"
          },
          "billTfn": {
            "type": [
              "string",
              "null"
            ],
            "default": null,
            "description": "税号；null 表示未提供。"
          },
          "billAddress": {
            "type": [
              "string",
              "null"
            ],
            "default": null,
            "description": "开票地址；null 表示未提供。"
          },
          "clientPhone": {
            "type": [
              "string",
              "null"
            ],
            "default": null,
            "description": "联系电话；null 表示未提供。"
          },
          "billBank": {
            "type": [
              "string",
              "null"
            ],
            "default": null,
            "description": "开户行及账号；null 表示未提供。"
          },
          "expressAddress": {
            "type": [
              "string",
              "null"
            ],
            "default": null,
            "description": "邮寄地址；null 表示未提供。"
          },
          "applyTime": {
            "type": [
              "string",
              "null"
            ],
            "default": null,
            "description": "申请时间，北京时间；null 表示未提供。"
          },
          "list": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "orderId": {
                  "type": [
                    "number",
                    "null"
                  ],
                  "default": null,
                  "description": "关联业务单据 ID；null 表示未提供。"
                },
                "orderNumber": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "default": null,
                  "description": "关联单号；null 表示未提供。"
                },
                "orderType": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "default": null,
                  "description": "关联单据类型中文名称；null 表示未提供。"
                },
                "orderTime": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "default": null,
                  "description": "关联单据时间，北京时间；null 表示未提供。"
                },
                "increaseAmount": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "default": null,
                  "description": "增加应收金额；十进制字符串，金额单位人民币元，保留商城精度；null 表示未提供。"
                },
                "reduceAmount": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "default": null,
                  "description": "减少应收金额；十进制字符串，金额单位人民币元，保留商城精度；null 表示未提供。"
                },
                "receivableAmount": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "default": null,
                  "description": "按明细顺序累计的应收金额；十进制字符串，金额单位人民币元，保留商城精度；null 表示未提供。"
                }
              },
              "additionalProperties": false
            },
            "default": [],
            "description": "关联单据明细"
          }
        },
        "required": [
          "invoiceId"
        ],
        "additionalProperties": false,
        "$schema": "http://json-schema.org/draft-07/schema#"
      },
      "title": "get_invoice_detail",
      "annotations": {
        "readOnlyHint": true,
        "destructiveHint": false,
        "idempotentHint": true,
        "openWorldHint": false
      }
    },
    {
      "name": "get_ai_quote_quota",
      "description": "查询当前客户今日 AI 报价配额。",
      "inputSchema": {
        "type": "object",
        "properties": {
          "accessToken": {
            "type": "string",
            "minLength": 1,
            "maxLength": 8192,
            "description": "仅账号密码直登 Token 的兼容参数。优先使用 Authorization: Bearer；OAuth Token 只能放请求头。不得传官网 Token"
          }
        },
        "additionalProperties": false,
        "$schema": "http://json-schema.org/draft-07/schema#"
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "usedCount": {
            "type": [
              "number",
              "null"
            ],
            "default": null,
            "description": "今日已用需求条数；null 表示未提供。"
          },
          "remainingCount": {
            "type": [
              "number",
              "null"
            ],
            "default": null,
            "description": "今日剩余需求条数；null 表示未提供。"
          },
          "totalCount": {
            "type": [
              "number",
              "null"
            ],
            "default": null,
            "description": "今日总额度；null 表示未提供。"
          },
          "date": {
            "type": [
              "string",
              "null"
            ],
            "default": null,
            "description": "配额所属日期，北京时间；null 表示未提供。"
          }
        },
        "additionalProperties": false,
        "$schema": "http://json-schema.org/draft-07/schema#"
      },
      "title": "get_ai_quote_quota",
      "annotations": {
        "readOnlyHint": true,
        "destructiveHint": false,
        "idempotentHint": true,
        "openWorldHint": false
      }
    },
    {
      "name": "submit_ai_quote",
      "description": "提交文本 AI 报价任务。需求没有准确标准、型号、规格，或 search_goods 无结果时，推荐 AI 报价。须根据用户意愿提交。提交立即返回任务 ID，AI 回调较慢；随后查询 list_ai_quotes / get_ai_quote_status / get_ai_quote_detail 或官网列表、详情获取结果，建议间隔 15 秒。超时不代表失败，不要自动重复提交。",
      "inputSchema": {
        "type": "object",
        "properties": {
          "requestId": {
            "type": "string",
            "pattern": "^[A-Za-z0-9_-]{16,100}$",
            "description": "客户端生成的幂等请求 ID，同一提交及重试保持一致；新需求用新 ID"
          },
          "promptsList": {
            "type": "array",
            "items": {
              "type": "string",
              "minLength": 1,
              "maxLength": 2000,
              "description": "一条用户的商品需求，保留数量、用途、规格等原始条件"
            },
            "minItems": 1,
            "maxItems": 50,
            "description": "用户需求文本数组，1–50 条；本工具不接受文件上传"
          },
          "saleType": {
            "type": "number",
            "enum": [
              1,
              2
            ],
            "default": 1,
            "description": "报价商品优先级：1 自营优先，2 联营优先，默认 1"
          },
          "orderBy": {
            "type": "number",
            "enum": [
              1,
              2
            ],
            "default": 2,
            "description": "报价排序模式：1 库存从高到低，2 价格从低到高，默认 2"
          },
          "deepType": {
            "type": "number",
            "enum": [
              2,
              3
            ],
            "default": 3,
            "description": "2 快速报价，3 深度报价，默认 3"
          },
          "haveStock": {
            "type": "boolean",
            "default": false,
            "description": "是否只查有库存商品，默认 false"
          },
          "accessToken": {
            "type": "string",
            "minLength": 1,
            "maxLength": 8192,
            "description": "仅账号密码直登 Token 的兼容参数。优先使用 Authorization: Bearer；OAuth Token 只能放请求头。不得传官网 Token"
          }
        },
        "required": [
          "requestId",
          "promptsList"
        ],
        "additionalProperties": false,
        "$schema": "http://json-schema.org/draft-07/schema#"
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "aimId": {
            "type": [
              "number",
              "null"
            ],
            "default": null,
            "description": "报价任务 ID；提交结果不确定时为 null，请查看列表确认；null 表示未提供。"
          },
          "inquiryUuid": {
            "type": [
              "string",
              "null"
            ],
            "default": null,
            "description": "询价业务编号；null 表示未提供。"
          },
          "requestCount": {
            "type": [
              "number",
              "null"
            ],
            "default": null,
            "description": "提交需求条数；null 表示未提供。"
          },
          "message": {
            "type": [
              "string",
              "null"
            ],
            "default": null,
            "description": "提交状态说明；null 表示未提供。"
          },
          "uncertain": {
            "type": "boolean",
            "default": false,
            "description": "true 表示上次提交结果尚未确定；禁止自动新建重复任务"
          },
          "pollAfterSeconds": {
            "type": [
              "number",
              "null"
            ],
            "default": null,
            "description": "建议 15 秒后查询；null 表示未提供。"
          },
          "detailUrl": {
            "type": [
              "string",
              "null"
            ],
            "default": null,
            "description": "官网报价详情链接；null 表示未提供。"
          }
        },
        "additionalProperties": false,
        "$schema": "http://json-schema.org/draft-07/schema#"
      },
      "title": "submit_ai_quote",
      "annotations": {
        "readOnlyHint": false,
        "destructiveHint": false,
        "idempotentHint": true,
        "openWorldHint": false
      }
    },
    {
      "name": "list_ai_quotes",
      "description": "查看当前客户 AI 报价列表；用于找回提交超时但实际已创建的任务。需求没有准确标准、型号、规格，或 search_goods 无结果时，推荐 AI 报价。须根据用户意愿提交。提交立即返回任务 ID，AI 回调较慢；随后查询 list_ai_quotes / get_ai_quote_status / get_ai_quote_detail 或官网列表、详情获取结果，建议间隔 15 秒。超时不代表失败，不要自动重复提交。",
      "inputSchema": {
        "type": "object",
        "properties": {
          "pageNum": {
            "type": "integer",
            "minimum": 1,
            "maximum": 100000,
            "default": 1,
            "description": "页码，从 1 开始，默认 1"
          },
          "pageSize": {
            "type": "integer",
            "minimum": 1,
            "maximum": 100,
            "default": 20,
            "description": "每页条数，1–100，默认 20"
          },
          "inquiryUuid": {
            "type": "string",
            "maxLength": 500,
            "description": "精确询价业务编号"
          },
          "accessToken": {
            "type": "string",
            "minLength": 1,
            "maxLength": 8192,
            "description": "仅账号密码直登 Token 的兼容参数。优先使用 Authorization: Bearer；OAuth Token 只能放请求头。不得传官网 Token"
          }
        },
        "additionalProperties": false,
        "$schema": "http://json-schema.org/draft-07/schema#"
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "list": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": [
                    "number",
                    "null"
                  ],
                  "default": null,
                  "description": "AI 报价任务 ID，对应详情参数 aimId；null 表示未提供。"
                },
                "inquiryUuid": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "default": null,
                  "description": "询价业务编号；null 表示未提供。"
                },
                "state": {
                  "type": [
                    "number",
                    "null"
                  ],
                  "default": null,
                  "description": "报价状态：0 失败，1 完成，2 处理中，3 取消，4 请求异常，5 无匹配，6 超时，7 等待询价，14 解析中，15 解析失败；null 表示未提供。"
                },
                "createTime": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "default": null,
                  "description": "提交时间，北京时间；null 表示未提供。"
                },
                "dataCount": {
                  "type": [
                    "number",
                    "null"
                  ],
                  "default": null,
                  "description": "需求条数；null 表示未提供。"
                },
                "message": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "default": null,
                  "description": "商城状态说明；null 表示未提供。"
                },
                "firstPrompt": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "default": null,
                  "description": "第一条用户需求；null 表示未提供。"
                }
              },
              "additionalProperties": false
            },
            "default": [],
            "description": "本页报价任务"
          },
          "total": {
            "type": [
              "number",
              "null"
            ],
            "default": null,
            "description": "总任务数；null 表示未提供。"
          }
        },
        "additionalProperties": false,
        "$schema": "http://json-schema.org/draft-07/schema#"
      },
      "title": "list_ai_quotes",
      "annotations": {
        "readOnlyHint": true,
        "destructiveHint": false,
        "idempotentHint": true,
        "openWorldHint": false
      }
    },
    {
      "name": "get_ai_quote_status",
      "description": "查询报价进度；成功需求数与匹配商品数分开，不将已处理条数当成功条数。",
      "inputSchema": {
        "type": "object",
        "properties": {
          "aimId": {
            "type": "integer",
            "exclusiveMinimum": 0,
            "maximum": 9007199254740991,
            "description": "报价任务 ID"
          },
          "accessToken": {
            "type": "string",
            "minLength": 1,
            "maxLength": 8192,
            "description": "仅账号密码直登 Token 的兼容参数。优先使用 Authorization: Bearer；OAuth Token 只能放请求头。不得传官网 Token"
          }
        },
        "required": [
          "aimId"
        ],
        "additionalProperties": false,
        "$schema": "http://json-schema.org/draft-07/schema#"
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "aimId": {
            "type": "integer",
            "exclusiveMinimum": 0,
            "maximum": 9007199254740991,
            "description": "报价任务 ID"
          },
          "inquiryUuid": {
            "type": [
              "string",
              "null"
            ],
            "default": null,
            "description": "询价业务编号；null 表示未提供。"
          },
          "state": {
            "type": [
              "number",
              "null"
            ],
            "default": null,
            "description": "报价状态：0 失败，1 完成，2 处理中，3 取消，4 请求异常，5 无匹配，6 超时，7 等待询价，14 解析中，15 解析失败；null 表示未提供。"
          },
          "stateDescription": {
            "type": [
              "string",
              "null"
            ],
            "default": null,
            "description": "报价状态说明；null 表示未提供。"
          },
          "totalCount": {
            "type": [
              "number",
              "null"
            ],
            "default": null,
            "description": "实际需求条数；null 表示未提供。"
          },
          "matchedCount": {
            "type": [
              "number",
              "null"
            ],
            "default": null,
            "description": "状态为完成的需求条数，不是商品个数；null 表示未提供。"
          },
          "pendingCount": {
            "type": [
              "number",
              "null"
            ],
            "default": null,
            "description": "处理中或等待中的需求条数；null 表示未提供。"
          },
          "failedCount": {
            "type": [
              "number",
              "null"
            ],
            "default": null,
            "description": "失败、无匹配、超时或取消的需求条数；null 表示未提供。"
          },
          "pollAfterSeconds": {
            "type": [
              "number",
              "null"
            ],
            "default": null,
            "description": "建议下次查询间隔，处理中为 15 秒；完成为 null；null 表示未提供。"
          },
          "detailUrl": {
            "type": [
              "string",
              "null"
            ],
            "default": null,
            "description": "官网报价详情链接，可由用户打开继续查看；null 表示未提供。"
          }
        },
        "required": [
          "aimId"
        ],
        "additionalProperties": false,
        "$schema": "http://json-schema.org/draft-07/schema#"
      },
      "title": "get_ai_quote_status",
      "annotations": {
        "readOnlyHint": true,
        "destructiveHint": false,
        "idempotentHint": true,
        "openWorldHint": false
      }
    },
    {
      "name": "get_ai_quote_detail",
      "description": "查询报价商品结果；处理中可先读取部分结果。需求没有准确标准、型号、规格，或 search_goods 无结果时，推荐 AI 报价。须根据用户意愿提交。提交立即返回任务 ID，AI 回调较慢；随后查询 list_ai_quotes / get_ai_quote_status / get_ai_quote_detail 或官网列表、详情获取结果，建议间隔 15 秒。超时不代表失败，不要自动重复提交。",
      "inputSchema": {
        "type": "object",
        "properties": {
          "aimId": {
            "type": "integer",
            "exclusiveMinimum": 0,
            "maximum": 9007199254740991,
            "description": "报价任务 ID"
          },
          "pageNum": {
            "type": "integer",
            "minimum": 1,
            "maximum": 100000,
            "default": 1,
            "description": "页码，从 1 开始，默认 1"
          },
          "pageSize": {
            "type": "integer",
            "minimum": 1,
            "maximum": 100,
            "default": 20,
            "description": "每页条数，1–100，默认 20"
          },
          "saleType": {
            "type": "number",
            "enum": [
              1,
              2
            ],
            "default": 1,
            "description": "报价商品优先级：1 自营优先，2 联营优先，默认 1"
          },
          "orderBy": {
            "type": "number",
            "enum": [
              1,
              2
            ],
            "default": 2,
            "description": "报价排序模式：1 库存从高到低，2 价格从低到高，默认 2"
          },
          "accessToken": {
            "type": "string",
            "minLength": 1,
            "maxLength": 8192,
            "description": "仅账号密码直登 Token 的兼容参数。优先使用 Authorization: Bearer；OAuth Token 只能放请求头。不得传官网 Token"
          }
        },
        "required": [
          "aimId"
        ],
        "additionalProperties": false,
        "$schema": "http://json-schema.org/draft-07/schema#"
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "aimId": {
            "type": "integer",
            "exclusiveMinimum": 0,
            "maximum": 9007199254740991,
            "description": "报价任务 ID"
          },
          "inquiryUuid": {
            "type": [
              "string",
              "null"
            ],
            "default": null,
            "description": "询价业务编号；null 表示未提供。"
          },
          "state": {
            "type": [
              "number",
              "null"
            ],
            "default": null,
            "description": "报价状态：0 失败，1 完成，2 处理中，3 取消，4 请求异常，5 无匹配，6 超时，7 等待询价，14 解析中，15 解析失败；null 表示未提供。"
          },
          "stateDescription": {
            "type": [
              "string",
              "null"
            ],
            "default": null,
            "description": "报价状态说明；null 表示未提供。"
          },
          "totalCount": {
            "type": [
              "number",
              "null"
            ],
            "default": null,
            "description": "实际需求条数；null 表示未提供。"
          },
          "matchedCount": {
            "type": [
              "number",
              "null"
            ],
            "default": null,
            "description": "状态为完成的需求条数，不是商品个数；null 表示未提供。"
          },
          "pendingCount": {
            "type": [
              "number",
              "null"
            ],
            "default": null,
            "description": "处理中或等待中的需求条数；null 表示未提供。"
          },
          "failedCount": {
            "type": [
              "number",
              "null"
            ],
            "default": null,
            "description": "失败、无匹配、超时或取消的需求条数；null 表示未提供。"
          },
          "pollAfterSeconds": {
            "type": [
              "number",
              "null"
            ],
            "default": null,
            "description": "建议下次查询间隔，处理中为 15 秒；完成为 null；null 表示未提供。"
          },
          "detailUrl": {
            "type": [
              "string",
              "null"
            ],
            "default": null,
            "description": "官网报价详情链接，可由用户打开继续查看；null 表示未提供。"
          },
          "detail": {
            "type": "object",
            "properties": {
              "total": {
                "type": [
                  "number",
                  "null"
                ],
                "default": null,
                "description": "总需求条数；null 表示未提供。"
              },
              "goodsTotal": {
                "type": [
                  "number",
                  "null"
                ],
                "default": null,
                "description": "本页匹配商品数；null 表示未提供。"
              },
              "priceAccuracy": {
                "type": [
                  "number",
                  "null"
                ],
                "default": null,
                "description": "当前客户价格小数位数；null 表示未提供。"
              },
              "list": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "aidId": {
                      "type": [
                        "number",
                        "null"
                      ],
                      "default": null,
                      "description": "单条需求 ID；null 表示未提供。"
                    },
                    "prompt": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "default": null,
                      "description": "原始需求；null 表示未提供。"
                    },
                    "aidState": {
                      "type": [
                        "number",
                        "null"
                      ],
                      "default": null,
                      "description": "报价状态：0 失败，1 完成，2 处理中，3 取消，4 请求异常，5 无匹配，6 超时，7 等待询价，14 解析中，15 解析失败；null 表示未提供。"
                    },
                    "errorMsg": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "default": null,
                      "description": "未完成或失败说明；null 表示未提供。"
                    },
                    "total": {
                      "type": [
                        "number",
                        "null"
                      ],
                      "default": null,
                      "description": "该需求匹配商品数量；null 表示未提供。"
                    },
                    "list": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "gId": {
                            "anyOf": [
                              {
                                "type": "integer",
                                "minimum": 1,
                                "maximum": 2147483647
                              },
                              {
                                "type": "null"
                              }
                            ],
                            "default": null,
                            "description": "商品 SKU ID；整数可直接传 get_goods_detail，null 表示未匹配商品"
                          },
                          "goodsInfo": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "default": null,
                            "description": "商品描述；null 表示未提供。"
                          },
                          "norm": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "default": null,
                            "description": "规格；null 表示未提供。"
                          },
                          "brand": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "default": null,
                            "description": "品牌；null 表示未提供。"
                          },
                          "materials": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "default": null,
                            "description": "材质；null 表示未提供。"
                          },
                          "level": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "default": null,
                            "description": "性能等级；null 表示未提供。"
                          },
                          "cHstandard": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "default": null,
                            "description": "中文标准；null 表示未提供。"
                          },
                          "eNstandard": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "default": null,
                            "description": "英文标准；null 表示未提供。"
                          },
                          "surfacetreat": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "default": null,
                            "description": "表面处理；null 表示未提供。"
                          },
                          "toothshape": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "default": null,
                            "description": "牙型；null 表示未提供。"
                          },
                          "unit": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "default": null,
                            "description": "商城计量单位组合，价格口径应结合该单位与商品详情核对；null 表示未提供。"
                          },
                          "baseUnit": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "default": null,
                            "description": "库存基本单位；null 表示未提供。"
                          },
                          "price": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "default": null,
                            "description": "商城当前展示价格；访客与已登录客户价格可能不同，不代表最终下单结算价；十进制字符串，金额单位人民币元，保留商城精度；null 表示未提供。"
                          },
                          "facestock": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "default": null,
                            "description": "商城展示库存；可能包含单位或文本，以库存基本单位为准，非承诺可交付数量；null 表示未提供。"
                          },
                          "bigNum": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "default": null,
                            "description": "大包装规格，可能带单位；null 表示未提供。"
                          },
                          "smallNum": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "default": null,
                            "description": "小包装规格，可能带单位；null 表示未提供。"
                          },
                          "img": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "default": null,
                            "description": "商品图片 URL；null 表示未提供。"
                          },
                          "remark": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "default": null,
                            "description": "商品备注；null 表示未提供。"
                          }
                        },
                        "additionalProperties": false
                      },
                      "default": [],
                      "description": "该需求的匹配商品，任务处理中也可能已有部分结果"
                    }
                  },
                  "additionalProperties": false
                },
                "default": [],
                "description": "按原始需求分组的匹配结果"
              }
            },
            "additionalProperties": false,
            "description": "报价明细"
          }
        },
        "required": [
          "aimId",
          "detail"
        ],
        "additionalProperties": false,
        "$schema": "http://json-schema.org/draft-07/schema#"
      },
      "title": "get_ai_quote_detail",
      "annotations": {
        "readOnlyHint": true,
        "destructiveHint": false,
        "idempotentHint": true,
        "openWorldHint": false
      }
    },
    {
      "name": "get_categories",
      "description": "逐级查询商城分类，省略 parentId 为一级，返回直接下级。",
      "inputSchema": {
        "type": "object",
        "properties": {
          "parentId": {
            "type": "string",
            "minLength": 1,
            "maxLength": 40,
            "description": "上级分类 ID，原样使用，不解析或拼接"
          },
          "accessToken": {
            "type": "string",
            "minLength": 1,
            "maxLength": 8192,
            "description": "仅账号密码直登 Token 的兼容参数。优先使用 Authorization: Bearer；OAuth Token 只能放请求头。不得传官网 Token"
          }
        },
        "additionalProperties": false,
        "$schema": "http://json-schema.org/draft-07/schema#"
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "categoryId": {
                  "type": "string",
                  "description": "不透明分类 ID"
                },
                "name": {
                  "type": "string",
                  "description": "名称"
                },
                "level": {
                  "type": "integer",
                  "minimum": 1,
                  "maximum": 3,
                  "description": "分类层级 1–3"
                },
                "parentId": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "上级分类 ID；一级为 null"
                },
                "hasChildren": {
                  "type": "boolean",
                  "description": "是否有下级分类"
                }
              },
              "required": [
                "categoryId",
                "name",
                "level",
                "parentId",
                "hasChildren"
              ],
              "additionalProperties": false
            },
            "description": "本次返回项或参与预览的完整集合"
          }
        },
        "required": [
          "items"
        ],
        "additionalProperties": false,
        "$schema": "http://json-schema.org/draft-07/schema#"
      },
      "title": "get_categories",
      "annotations": {
        "readOnlyHint": true,
        "destructiveHint": false,
        "idempotentHint": true,
        "openWorldHint": false
      }
    },
    {
      "name": "get_goods_filters",
      "description": "查询当前条件的有效筛选候选，使用返回值搜索，不传商城旧属性 ID。",
      "inputSchema": {
        "type": "object",
        "properties": {
          "keyword": {
            "type": "string",
            "maxLength": 200,
            "description": "名称、规格、SKU 或聚合 SKU；可省略并按分类浏览"
          },
          "categoryId": {
            "type": "string",
            "minLength": 1,
            "maxLength": 40,
            "description": "分类接口返回的 categoryId，原样使用，不解析或拼接"
          },
          "filters": {
            "type": "object",
            "properties": {
              "brand": {
                "type": "array",
                "items": {
                  "type": "string",
                  "maxLength": 100
                },
                "maxItems": 30,
                "description": "商品品牌"
              },
              "material": {
                "type": "array",
                "items": {
                  "type": "string",
                  "maxLength": 100
                },
                "maxItems": 30,
                "description": "材质候选值"
              },
              "grade": {
                "type": "array",
                "items": {
                  "type": "string",
                  "maxLength": 100
                },
                "maxItems": 30,
                "description": "等级候选值"
              },
              "diameter": {
                "type": "array",
                "items": {
                  "type": "string",
                  "maxLength": 100
                },
                "maxItems": 30,
                "description": "直径候选值"
              },
              "length": {
                "type": "array",
                "items": {
                  "type": "string",
                  "maxLength": 100
                },
                "maxItems": 30,
                "description": "长度候选值"
              },
              "surface": {
                "type": "array",
                "items": {
                  "type": "string",
                  "maxLength": 100
                },
                "maxItems": 30,
                "description": "表面处理候选值"
              },
              "thread": {
                "type": "array",
                "items": {
                  "type": "string",
                  "maxLength": 100
                },
                "maxItems": 30,
                "description": "牙型候选值"
              },
              "heatTreatment": {
                "type": "array",
                "items": {
                  "type": "string",
                  "maxLength": 100
                },
                "maxItems": 30,
                "description": "热处理候选值"
              },
              "region": {
                "type": "array",
                "items": {
                  "type": "string",
                  "maxLength": 100
                },
                "maxItems": 30,
                "description": "仓库地区候选值"
              }
            },
            "additionalProperties": false,
            "description": "先查询筛选候选；同属性并集，不同属性交集"
          },
          "supplyType": {
            "type": "string",
            "enum": [
              "all",
              "self",
              "joint"
            ],
            "default": "all",
            "description": "全部、自营与寄售整包装、联营整包装"
          },
          "accessToken": {
            "type": "string",
            "minLength": 1,
            "maxLength": 8192,
            "description": "仅账号密码直登 Token 的兼容参数。优先使用 Authorization: Bearer；OAuth Token 只能放请求头。不得传官网 Token"
          }
        },
        "additionalProperties": false,
        "$schema": "http://json-schema.org/draft-07/schema#"
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "key": {
                  "type": "string",
                  "description": "筛选属性名"
                },
                "name": {
                  "type": "string",
                  "description": "名称"
                },
                "values": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  },
                  "description": "有效候选值"
                }
              },
              "required": [
                "key",
                "name",
                "values"
              ],
              "additionalProperties": false
            },
            "description": "本次返回项或参与预览的完整集合"
          }
        },
        "required": [
          "items"
        ],
        "additionalProperties": false,
        "$schema": "http://json-schema.org/draft-07/schema#"
      },
      "title": "get_goods_filters",
      "annotations": {
        "readOnlyHint": true,
        "destructiveHint": false,
        "idempotentHint": true,
        "openWorldHint": false
      }
    },
    {
      "name": "search_goods",
      "description": "搜索商品，支持 SKU、关键词、分类及筛选。按 hasMore 翻页；价格排序是活动前基本单位客户价，不同单位不可直接比较。游客价格库存为 null，不能解释为免费或无库存。 需求没有准确标准、型号、规格，或 search_goods 无结果时，推荐 AI 报价。须根据用户意愿提交。提交立即返回任务 ID，AI 回调较慢；随后查询 list_ai_quotes / get_ai_quote_status / get_ai_quote_detail 或官网列表、详情获取结果，建议间隔 15 秒。超时不代表失败，不要自动重复提交。",
      "inputSchema": {
        "type": "object",
        "properties": {
          "keyword": {
            "type": "string",
            "maxLength": 200,
            "description": "名称、规格、SKU 或聚合 SKU；可省略并按分类浏览"
          },
          "categoryId": {
            "type": "string",
            "minLength": 1,
            "maxLength": 40,
            "description": "分类接口返回的 categoryId，原样使用，不解析或拼接"
          },
          "filters": {
            "type": "object",
            "properties": {
              "brand": {
                "type": "array",
                "items": {
                  "type": "string",
                  "maxLength": 100
                },
                "maxItems": 30,
                "description": "商品品牌"
              },
              "material": {
                "type": "array",
                "items": {
                  "type": "string",
                  "maxLength": 100
                },
                "maxItems": 30,
                "description": "材质候选值"
              },
              "grade": {
                "type": "array",
                "items": {
                  "type": "string",
                  "maxLength": 100
                },
                "maxItems": 30,
                "description": "等级候选值"
              },
              "diameter": {
                "type": "array",
                "items": {
                  "type": "string",
                  "maxLength": 100
                },
                "maxItems": 30,
                "description": "直径候选值"
              },
              "length": {
                "type": "array",
                "items": {
                  "type": "string",
                  "maxLength": 100
                },
                "maxItems": 30,
                "description": "长度候选值"
              },
              "surface": {
                "type": "array",
                "items": {
                  "type": "string",
                  "maxLength": 100
                },
                "maxItems": 30,
                "description": "表面处理候选值"
              },
              "thread": {
                "type": "array",
                "items": {
                  "type": "string",
                  "maxLength": 100
                },
                "maxItems": 30,
                "description": "牙型候选值"
              },
              "heatTreatment": {
                "type": "array",
                "items": {
                  "type": "string",
                  "maxLength": 100
                },
                "maxItems": 30,
                "description": "热处理候选值"
              },
              "region": {
                "type": "array",
                "items": {
                  "type": "string",
                  "maxLength": 100
                },
                "maxItems": 30,
                "description": "仓库地区候选值"
              }
            },
            "additionalProperties": false,
            "description": "先查询筛选候选；同属性并集，不同属性交集"
          },
          "supplyType": {
            "type": "string",
            "enum": [
              "all",
              "self",
              "joint"
            ],
            "default": "all",
            "description": "全部、自营与寄售整包装、联营整包装"
          },
          "sort": {
            "type": "string",
            "enum": [
              "default",
              "priceAsc",
              "priceDesc"
            ],
            "default": "default",
            "description": "default 默认；priceAsc 升序；priceDesc 降序；价格排序需要登录"
          },
          "page": {
            "type": "integer",
            "minimum": 1,
            "maximum": 100000,
            "default": 1,
            "description": "页码从 1 开始"
          },
          "pageSize": {
            "type": "integer",
            "minimum": 1,
            "maximum": 100,
            "default": 20,
            "description": "每页数量 1–100"
          },
          "accessToken": {
            "type": "string",
            "minLength": 1,
            "maxLength": 8192,
            "description": "仅账号密码直登 Token 的兼容参数。优先使用 Authorization: Bearer；OAuth Token 只能放请求头。不得传官网 Token"
          }
        },
        "additionalProperties": false,
        "$schema": "http://json-schema.org/draft-07/schema#"
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "gId": {
                  "type": "integer",
                  "minimum": 1,
                  "maximum": 2147483647,
                  "description": "搜索返回的商品 SKU，不使用散装内部 SKU"
                },
                "name": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "名称"
                },
                "brand": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "商品品牌"
                },
                "specification": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "规格"
                },
                "imageUrl": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "商品图片地址"
                },
                "detailUrl": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "商城人工查看入口"
                },
                "priceUnit": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "基本计价单位"
                },
                "reason": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "不可用或受限原因；null 表示无补充原因"
                },
                "customerUnitPrice": {
                  "anyOf": [
                    {
                      "type": "string",
                      "pattern": "^-?\\d+(\\.\\d+)?$",
                      "description": "十进制字符串；保持服务端精度，null 不是 0"
                    },
                    {
                      "type": "null"
                    }
                  ],
                  "description": "十进制字符串；保持服务端精度，null 不是 0"
                },
                "visibility": {
                  "type": "string",
                  "enum": [
                    "visible",
                    "loginRequired",
                    "unavailable"
                  ],
                  "description": "visible 可见；loginRequired 需登录；unavailable 无法确认"
                },
                "attributes": {
                  "type": "object",
                  "additionalProperties": {
                    "type": "string"
                  },
                  "description": "中文商品属性名及值"
                },
                "delivery": {
                  "anyOf": [
                    {
                      "type": "object",
                      "properties": {
                        "status": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "配置状态"
                        },
                        "basis": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "适用或计算依据"
                        },
                        "description": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "说明"
                        },
                        "cloudNotice": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "云仓配送时间不固定的说明"
                        }
                      },
                      "required": [
                        "status",
                        "basis",
                        "description"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "null"
                    }
                  ],
                  "description": "配送配置说明，库存不是到货承诺"
                },
                "purchaseOptions": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "optionId": {
                        "type": [
                          "string",
                          "null"
                        ],
                        "description": "服务端购买标识，原样使用；null 不可提交"
                      },
                      "name": {
                        "type": [
                          "string",
                          "null"
                        ],
                        "description": "名称"
                      },
                      "fulfillment": {
                        "type": [
                          "string",
                          "null"
                        ],
                        "description": "自营、联营、零售或云仓"
                      },
                      "unit": {
                        "type": [
                          "string",
                          "null"
                        ],
                        "description": "份数单位"
                      },
                      "baseUnit": {
                        "type": [
                          "string",
                          "null"
                        ],
                        "description": "基本数量单位"
                      },
                      "priceCondition": {
                        "type": [
                          "string",
                          "null"
                        ],
                        "description": "折扣价适用说明"
                      },
                      "reason": {
                        "type": [
                          "string",
                          "null"
                        ],
                        "description": "不可用或受限原因；null 表示无补充原因"
                      },
                      "packageKind": {
                        "type": "string",
                        "enum": [
                          "big",
                          "small",
                          "scattered"
                        ],
                        "description": "big 整箱；small 小包；scattered 散装"
                      },
                      "quantityPerPackage": {
                        "type": "string",
                        "pattern": "^-?\\d+(\\.\\d+)?$",
                        "description": "十进制字符串；保持服务端精度，null 不是 0"
                      },
                      "minCount": {
                        "type": "string",
                        "pattern": "^-?\\d+(\\.\\d+)?$",
                        "description": "十进制字符串；保持服务端精度，null 不是 0"
                      },
                      "minimumQuantity": {
                        "type": "string",
                        "pattern": "^-?\\d+(\\.\\d+)?$",
                        "description": "十进制字符串；保持服务端精度，null 不是 0"
                      },
                      "customerUnitPrice": {
                        "anyOf": [
                          {
                            "type": "string",
                            "pattern": "^-?\\d+(\\.\\d+)?$",
                            "description": "十进制字符串；保持服务端精度，null 不是 0"
                          },
                          {
                            "type": "null"
                          }
                        ],
                        "description": "十进制字符串；保持服务端精度，null 不是 0"
                      },
                      "discountedUnitPrice": {
                        "anyOf": [
                          {
                            "type": "string",
                            "pattern": "^-?\\d+(\\.\\d+)?$",
                            "description": "十进制字符串；保持服务端精度，null 不是 0"
                          },
                          {
                            "type": "null"
                          }
                        ],
                        "description": "十进制字符串；保持服务端精度，null 不是 0"
                      },
                      "stockQuantity": {
                        "anyOf": [
                          {
                            "type": "string",
                            "pattern": "^-?\\d+(\\.\\d+)?$",
                            "description": "十进制字符串；保持服务端精度，null 不是 0"
                          },
                          {
                            "type": "null"
                          }
                        ],
                        "description": "十进制字符串；保持服务端精度，null 不是 0"
                      },
                      "visibility": {
                        "type": "string",
                        "enum": [
                          "visible",
                          "loginRequired",
                          "unavailable"
                        ],
                        "description": "visible 可见；loginRequired 需登录；unavailable 无法确认"
                      },
                      "purchasable": {
                        "type": "boolean",
                        "description": "当前是否可购买"
                      },
                      "fees": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "kind": {
                              "type": [
                                "string",
                                "null"
                              ],
                              "description": "规则或活动类型"
                            },
                            "name": {
                              "type": [
                                "string",
                                "null"
                              ],
                              "description": "名称"
                            },
                            "status": {
                              "type": [
                                "string",
                                "null"
                              ],
                              "description": "配置状态"
                            },
                            "basis": {
                              "type": [
                                "string",
                                "null"
                              ],
                              "description": "适用或计算依据"
                            },
                            "ratePercent": {
                              "type": [
                                "string",
                                "null"
                              ],
                              "description": "百分数费率"
                            },
                            "amount": {
                              "type": [
                                "string",
                                "null"
                              ],
                              "description": "人民币金额，十进制字符串；null 为未知或不适用"
                            },
                            "description": {
                              "type": [
                                "string",
                                "null"
                              ],
                              "description": "说明"
                            }
                          },
                          "required": [
                            "kind",
                            "name",
                            "status",
                            "basis",
                            "ratePercent",
                            "amount",
                            "description"
                          ],
                          "additionalProperties": false
                        },
                        "description": "费用规则"
                      }
                    },
                    "required": [
                      "optionId",
                      "name",
                      "fulfillment",
                      "unit",
                      "baseUnit",
                      "priceCondition",
                      "reason",
                      "packageKind",
                      "quantityPerPackage",
                      "minCount",
                      "minimumQuantity",
                      "customerUnitPrice",
                      "discountedUnitPrice",
                      "stockQuantity",
                      "visibility",
                      "purchasable"
                    ],
                    "additionalProperties": false
                  },
                  "description": "当前购买选项"
                }
              },
              "required": [
                "gId",
                "name",
                "brand",
                "specification",
                "imageUrl",
                "detailUrl",
                "priceUnit",
                "reason",
                "customerUnitPrice",
                "visibility",
                "delivery",
                "purchaseOptions"
              ],
              "additionalProperties": false
            },
            "description": "本次返回项或参与预览的完整集合"
          },
          "page": {
            "type": "integer",
            "description": "页码从 1 开始"
          },
          "pageSize": {
            "type": "integer",
            "description": "每页数量 1–100"
          },
          "hasMore": {
            "type": "boolean",
            "description": "服务端多读一条确认是否有下一页"
          }
        },
        "required": [
          "items",
          "page",
          "pageSize",
          "hasMore"
        ],
        "additionalProperties": false,
        "$schema": "http://json-schema.org/draft-07/schema#"
      },
      "title": "search_goods",
      "annotations": {
        "readOnlyHint": true,
        "destructiveHint": false,
        "idempotentHint": true,
        "openWorldHint": false
      }
    },
    {
      "name": "get_goods_detail",
      "description": "查询购买选项、活动、配送和费用规则。使用原始 optionId 与整数份数；不可购买或包装失效时重新查询，不猜选项、不自动换商品。配送配置未知时不能承诺到货。",
      "inputSchema": {
        "type": "object",
        "properties": {
          "gId": {
            "type": "integer",
            "minimum": 1,
            "maximum": 2147483647,
            "description": "搜索返回的商品 SKU，不使用散装内部 SKU"
          },
          "accessToken": {
            "type": "string",
            "minLength": 1,
            "maxLength": 8192,
            "description": "仅账号密码直登 Token 的兼容参数。优先使用 Authorization: Bearer；OAuth Token 只能放请求头。不得传官网 Token"
          }
        },
        "required": [
          "gId"
        ],
        "additionalProperties": false,
        "$schema": "http://json-schema.org/draft-07/schema#"
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "gId": {
            "type": "integer",
            "minimum": 1,
            "maximum": 2147483647,
            "description": "搜索返回的商品 SKU，不使用散装内部 SKU"
          },
          "name": {
            "type": [
              "string",
              "null"
            ],
            "description": "名称"
          },
          "brand": {
            "type": [
              "string",
              "null"
            ],
            "description": "商品品牌"
          },
          "specification": {
            "type": [
              "string",
              "null"
            ],
            "description": "规格"
          },
          "imageUrl": {
            "type": [
              "string",
              "null"
            ],
            "description": "商品图片地址"
          },
          "detailUrl": {
            "type": [
              "string",
              "null"
            ],
            "description": "商城人工查看入口"
          },
          "priceUnit": {
            "type": [
              "string",
              "null"
            ],
            "description": "基本计价单位"
          },
          "reason": {
            "type": [
              "string",
              "null"
            ],
            "description": "不可用或受限原因；null 表示无补充原因"
          },
          "customerUnitPrice": {
            "anyOf": [
              {
                "type": "string",
                "pattern": "^-?\\d+(\\.\\d+)?$",
                "description": "十进制字符串；保持服务端精度，null 不是 0"
              },
              {
                "type": "null"
              }
            ],
            "description": "十进制字符串；保持服务端精度，null 不是 0"
          },
          "visibility": {
            "type": "string",
            "enum": [
              "visible",
              "loginRequired",
              "unavailable"
            ],
            "description": "visible 可见；loginRequired 需登录；unavailable 无法确认"
          },
          "attributes": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            },
            "description": "中文商品属性名及值"
          },
          "delivery": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "status": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "description": "配置状态"
                  },
                  "basis": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "description": "适用或计算依据"
                  },
                  "description": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "description": "说明"
                  },
                  "cloudNotice": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "description": "云仓配送时间不固定的说明"
                  }
                },
                "required": [
                  "status",
                  "basis",
                  "description"
                ],
                "additionalProperties": false
              },
              {
                "type": "null"
              }
            ],
            "description": "配送配置说明，库存不是到货承诺"
          },
          "purchaseOptions": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "optionId": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "服务端购买标识，原样使用；null 不可提交"
                },
                "name": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "名称"
                },
                "fulfillment": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "自营、联营、零售或云仓"
                },
                "unit": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "份数单位"
                },
                "baseUnit": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "基本数量单位"
                },
                "priceCondition": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "折扣价适用说明"
                },
                "reason": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "不可用或受限原因；null 表示无补充原因"
                },
                "packageKind": {
                  "type": "string",
                  "enum": [
                    "big",
                    "small",
                    "scattered"
                  ],
                  "description": "big 整箱；small 小包；scattered 散装"
                },
                "quantityPerPackage": {
                  "type": "string",
                  "pattern": "^-?\\d+(\\.\\d+)?$",
                  "description": "十进制字符串；保持服务端精度，null 不是 0"
                },
                "minCount": {
                  "type": "string",
                  "pattern": "^-?\\d+(\\.\\d+)?$",
                  "description": "十进制字符串；保持服务端精度，null 不是 0"
                },
                "minimumQuantity": {
                  "type": "string",
                  "pattern": "^-?\\d+(\\.\\d+)?$",
                  "description": "十进制字符串；保持服务端精度，null 不是 0"
                },
                "customerUnitPrice": {
                  "anyOf": [
                    {
                      "type": "string",
                      "pattern": "^-?\\d+(\\.\\d+)?$",
                      "description": "十进制字符串；保持服务端精度，null 不是 0"
                    },
                    {
                      "type": "null"
                    }
                  ],
                  "description": "十进制字符串；保持服务端精度，null 不是 0"
                },
                "discountedUnitPrice": {
                  "anyOf": [
                    {
                      "type": "string",
                      "pattern": "^-?\\d+(\\.\\d+)?$",
                      "description": "十进制字符串；保持服务端精度，null 不是 0"
                    },
                    {
                      "type": "null"
                    }
                  ],
                  "description": "十进制字符串；保持服务端精度，null 不是 0"
                },
                "stockQuantity": {
                  "anyOf": [
                    {
                      "type": "string",
                      "pattern": "^-?\\d+(\\.\\d+)?$",
                      "description": "十进制字符串；保持服务端精度，null 不是 0"
                    },
                    {
                      "type": "null"
                    }
                  ],
                  "description": "十进制字符串；保持服务端精度，null 不是 0"
                },
                "visibility": {
                  "type": "string",
                  "enum": [
                    "visible",
                    "loginRequired",
                    "unavailable"
                  ],
                  "description": "visible 可见；loginRequired 需登录；unavailable 无法确认"
                },
                "purchasable": {
                  "type": "boolean",
                  "description": "当前是否可购买"
                },
                "fees": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "kind": {
                        "type": [
                          "string",
                          "null"
                        ],
                        "description": "规则或活动类型"
                      },
                      "name": {
                        "type": [
                          "string",
                          "null"
                        ],
                        "description": "名称"
                      },
                      "status": {
                        "type": [
                          "string",
                          "null"
                        ],
                        "description": "配置状态"
                      },
                      "basis": {
                        "type": [
                          "string",
                          "null"
                        ],
                        "description": "适用或计算依据"
                      },
                      "ratePercent": {
                        "type": [
                          "string",
                          "null"
                        ],
                        "description": "百分数费率"
                      },
                      "amount": {
                        "type": [
                          "string",
                          "null"
                        ],
                        "description": "人民币金额，十进制字符串；null 为未知或不适用"
                      },
                      "description": {
                        "type": [
                          "string",
                          "null"
                        ],
                        "description": "说明"
                      }
                    },
                    "required": [
                      "kind",
                      "name",
                      "status",
                      "basis",
                      "ratePercent",
                      "amount",
                      "description"
                    ],
                    "additionalProperties": false
                  },
                  "description": "费用规则"
                }
              },
              "required": [
                "optionId",
                "name",
                "fulfillment",
                "unit",
                "baseUnit",
                "priceCondition",
                "reason",
                "packageKind",
                "quantityPerPackage",
                "minCount",
                "minimumQuantity",
                "customerUnitPrice",
                "discountedUnitPrice",
                "stockQuantity",
                "visibility",
                "purchasable"
              ],
              "additionalProperties": false
            },
            "description": "当前购买选项"
          },
          "promotions": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "activityId": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "活动 ID，仅说明核对，不能提交指定活动"
                },
                "name": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "名称"
                },
                "kind": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "规则或活动类型"
                },
                "description": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "说明"
                },
                "startTime": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "活动开始时间"
                },
                "endTime": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "活动结束时间"
                },
                "discountPercent": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "支付百分数，90 表示支付原价 90%"
                },
                "stackable": {
                  "type": "boolean",
                  "description": "是否可叠加"
                },
                "tiers": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "thresholdAmount": {
                        "type": [
                          "string",
                          "null"
                        ],
                        "description": "阶梯门槛金额"
                      },
                      "kind": {
                        "type": [
                          "string",
                          "null"
                        ],
                        "description": "规则或活动类型"
                      },
                      "value": {
                        "type": [
                          "string",
                          "null"
                        ],
                        "description": "阶梯支付百分数或减免金额"
                      },
                      "repeating": {
                        "type": "boolean",
                        "description": "是否每满重复减免"
                      }
                    },
                    "required": [
                      "thresholdAmount",
                      "kind",
                      "value",
                      "repeating"
                    ],
                    "additionalProperties": false
                  },
                  "description": "活动阶梯"
                }
              },
              "required": [
                "activityId",
                "name",
                "kind",
                "description",
                "startTime",
                "endTime",
                "discountPercent",
                "stackable",
                "tiers"
              ],
              "additionalProperties": false
            },
            "description": "商品可用活动，仅供说明；最优组合以预览为准"
          }
        },
        "required": [
          "gId",
          "name",
          "brand",
          "specification",
          "imageUrl",
          "detailUrl",
          "priceUnit",
          "reason",
          "customerUnitPrice",
          "visibility",
          "delivery",
          "purchaseOptions",
          "promotions"
        ],
        "additionalProperties": false,
        "$schema": "http://json-schema.org/draft-07/schema#"
      },
      "title": "get_goods_detail",
      "annotations": {
        "readOnlyHint": true,
        "destructiveHint": false,
        "idempotentHint": true,
        "openWorldHint": false
      }
    },
    {
      "name": "preview_cart",
      "description": "只读预览完整商品集合的最优合法费用方案，输入为空返回零合计。total 不含运费、优惠券和支付方式费用；不锁价、不留库存、不改变网页活动选择。计算失败不得编造近似值。",
      "inputSchema": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "gId": {
                  "type": "integer",
                  "minimum": 1,
                  "maximum": 2147483647,
                  "description": "搜索返回的商品 SKU，不使用散装内部 SKU"
                },
                "optionId": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 100,
                  "description": "详情返回的购买选项 optionId，原样使用，不解析或拼接"
                },
                "count": {
                  "type": "integer",
                  "minimum": 1,
                  "maximum": 1000000000,
                  "description": "购买选项的整数份数，不是基本数量"
                }
              },
              "required": [
                "gId",
                "optionId",
                "count"
              ],
              "additionalProperties": false
            },
            "maxItems": 100,
            "description": "本次返回项或参与预览的完整集合"
          },
          "accessToken": {
            "type": "string",
            "minLength": 1,
            "maxLength": 8192,
            "description": "仅账号密码直登 Token 的兼容参数。优先使用 Authorization: Bearer；OAuth Token 只能放请求头。不得传官网 Token"
          }
        },
        "required": [
          "items"
        ],
        "additionalProperties": false,
        "$schema": "http://json-schema.org/draft-07/schema#"
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "gId": {
                  "type": "integer",
                  "minimum": 1,
                  "maximum": 2147483647,
                  "description": "搜索返回的商品 SKU，不使用散装内部 SKU"
                },
                "optionId": {
                  "type": "string",
                  "description": "服务端购买标识，原样使用；null 不可提交"
                },
                "count": {
                  "type": "string",
                  "pattern": "^-?\\d+(\\.\\d+)?$",
                  "description": "十进制字符串；保持服务端精度，null 不是 0"
                },
                "quantity": {
                  "type": "string",
                  "pattern": "^-?\\d+(\\.\\d+)?$",
                  "description": "十进制字符串；保持服务端精度，null 不是 0"
                },
                "customerUnitPrice": {
                  "type": "string",
                  "pattern": "^-?\\d+(\\.\\d+)?$",
                  "description": "十进制字符串；保持服务端精度，null 不是 0"
                },
                "unitPrice": {
                  "type": "string",
                  "pattern": "^-?\\d+(\\.\\d+)?$",
                  "description": "十进制字符串；保持服务端精度，null 不是 0"
                },
                "goodsAmount": {
                  "type": "string",
                  "pattern": "^-?\\d+(\\.\\d+)?$",
                  "description": "十进制字符串；保持服务端精度，null 不是 0"
                },
                "discountAmount": {
                  "type": "string",
                  "pattern": "^-?\\d+(\\.\\d+)?$",
                  "description": "十进制字符串；保持服务端精度，null 不是 0"
                },
                "unpackingFee": {
                  "type": "string",
                  "pattern": "^-?\\d+(\\.\\d+)?$",
                  "description": "十进制字符串；保持服务端精度，null 不是 0"
                },
                "retailFee": {
                  "type": "string",
                  "pattern": "^-?\\d+(\\.\\d+)?$",
                  "description": "十进制字符串；保持服务端精度，null 不是 0"
                },
                "total": {
                  "type": "string",
                  "pattern": "^-?\\d+(\\.\\d+)?$",
                  "description": "十进制字符串；保持服务端精度，null 不是 0"
                },
                "baseUnit": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "基本数量单位"
                },
                "unpackingFeeBasis": {
                  "anyOf": [
                    {
                      "type": "string",
                      "pattern": "^-?\\d+(\\.\\d+)?$",
                      "description": "十进制字符串；保持服务端精度，null 不是 0"
                    },
                    {
                      "type": "null"
                    }
                  ],
                  "description": "十进制字符串；保持服务端精度，null 不是 0"
                },
                "unpackingFeeRatePercent": {
                  "anyOf": [
                    {
                      "type": "string",
                      "pattern": "^-?\\d+(\\.\\d+)?$",
                      "description": "十进制字符串；保持服务端精度，null 不是 0"
                    },
                    {
                      "type": "null"
                    }
                  ],
                  "description": "十进制字符串；保持服务端精度，null 不是 0"
                }
              },
              "required": [
                "gId",
                "optionId",
                "count",
                "quantity",
                "customerUnitPrice",
                "unitPrice",
                "goodsAmount",
                "discountAmount",
                "unpackingFee",
                "retailFee",
                "total",
                "baseUnit",
                "unpackingFeeBasis",
                "unpackingFeeRatePercent"
              ],
              "additionalProperties": false
            },
            "description": "本次返回项或参与预览的完整集合"
          },
          "goodsAmount": {
            "type": "string",
            "pattern": "^-?\\d+(\\.\\d+)?$",
            "description": "十进制字符串；保持服务端精度，null 不是 0"
          },
          "discountAmount": {
            "type": "string",
            "pattern": "^-?\\d+(\\.\\d+)?$",
            "description": "十进制字符串；保持服务端精度，null 不是 0"
          },
          "unpackingFee": {
            "type": "string",
            "pattern": "^-?\\d+(\\.\\d+)?$",
            "description": "十进制字符串；保持服务端精度，null 不是 0"
          },
          "retailFee": {
            "type": "string",
            "pattern": "^-?\\d+(\\.\\d+)?$",
            "description": "十进制字符串；保持服务端精度，null 不是 0"
          },
          "total": {
            "type": "string",
            "pattern": "^-?\\d+(\\.\\d+)?$",
            "description": "十进制字符串；保持服务端精度，null 不是 0"
          },
          "promotions": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "activityId": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "活动 ID，仅说明核对，不能提交指定活动"
                },
                "name": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "名称"
                },
                "discountAmount": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "优惠金额"
                },
                "goodsIds": {
                  "type": "array",
                  "items": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 2147483647,
                    "description": "搜索返回的商品 SKU，不使用散装内部 SKU"
                  },
                  "description": "适用商品 ID"
                }
              },
              "required": [
                "activityId",
                "name",
                "discountAmount",
                "goodsIds"
              ],
              "additionalProperties": false
            },
            "description": "商品可用活动或预览实际使用活动"
          },
          "restrictions": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "kind": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "规则或活动类型"
                },
                "message": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "业务结果或限制说明"
                },
                "requiredAmount": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "要求达到的金额"
                },
                "currentAmount": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "当前参与门槛的金额"
                },
                "goodsIds": {
                  "type": "array",
                  "items": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 2147483647,
                    "description": "搜索返回的商品 SKU，不使用散装内部 SKU"
                  },
                  "description": "适用商品 ID"
                }
              },
              "required": [
                "kind",
                "message",
                "requiredAmount",
                "currentAmount",
                "goodsIds"
              ],
              "additionalProperties": false
            },
            "description": "适用分组门槛"
          },
          "calculatedAt": {
            "type": "string",
            "description": "完整计算完成的 UTC 时间"
          },
          "complete": {
            "type": "boolean",
            "const": true,
            "description": "成功必须为 true，不返回近似或部分计算"
          },
          "explanation": {
            "type": "string",
            "description": "预览范围说明"
          },
          "excluded": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "未包含的费用项目"
          }
        },
        "required": [
          "items",
          "goodsAmount",
          "discountAmount",
          "unpackingFee",
          "retailFee",
          "total",
          "promotions",
          "restrictions",
          "calculatedAt",
          "complete",
          "explanation",
          "excluded"
        ],
        "additionalProperties": false,
        "$schema": "http://json-schema.org/draft-07/schema#"
      },
      "title": "preview_cart",
      "annotations": {
        "readOnlyHint": true,
        "destructiveHint": false,
        "idempotentHint": true,
        "openWorldHint": false
      }
    },
    {
      "name": "get_cart",
      "description": "写入前查询购物车，避免重复添加。previewScope=returnedItems，关键词筛选后的预览不能称全车金额；preview=null 时看 previewError，不能自行凑完整合计。",
      "inputSchema": {
        "type": "object",
        "properties": {
          "keyword": {
            "type": "string",
            "maxLength": 200,
            "description": "名称、规格、SKU 或聚合 SKU；可省略并按分类浏览"
          },
          "accessToken": {
            "type": "string",
            "minLength": 1,
            "maxLength": 8192,
            "description": "仅账号密码直登 Token 的兼容参数。优先使用 Authorization: Bearer；OAuth Token 只能放请求头。不得传官网 Token"
          }
        },
        "additionalProperties": false,
        "$schema": "http://json-schema.org/draft-07/schema#"
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "itemId": {
                  "type": "string",
                  "description": "购物车不透明标识，原样使用"
                },
                "reason": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "不可用或受限原因；null 表示无补充原因"
                },
                "editable": {
                  "type": "boolean",
                  "description": "是否可改量"
                },
                "removable": {
                  "type": "boolean",
                  "description": "是否可删除"
                },
                "product": {
                  "type": "object",
                  "properties": {
                    "gId": {
                      "type": "integer",
                      "minimum": 1,
                      "maximum": 2147483647,
                      "description": "搜索返回的商品 SKU，不使用散装内部 SKU"
                    },
                    "name": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "名称"
                    },
                    "brand": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "商品品牌"
                    },
                    "specification": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "规格"
                    },
                    "imageUrl": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "商品图片地址"
                    },
                    "detailUrl": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "商城人工查看入口"
                    },
                    "priceUnit": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "基本计价单位"
                    },
                    "reason": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "不可用或受限原因；null 表示无补充原因"
                    },
                    "customerUnitPrice": {
                      "anyOf": [
                        {
                          "type": "string",
                          "pattern": "^-?\\d+(\\.\\d+)?$",
                          "description": "十进制字符串；保持服务端精度，null 不是 0"
                        },
                        {
                          "type": "null"
                        }
                      ],
                      "description": "十进制字符串；保持服务端精度，null 不是 0"
                    },
                    "visibility": {
                      "type": "string",
                      "enum": [
                        "visible",
                        "loginRequired",
                        "unavailable"
                      ],
                      "description": "visible 可见；loginRequired 需登录；unavailable 无法确认"
                    },
                    "attributes": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "string"
                      },
                      "description": "中文商品属性名及值"
                    },
                    "delivery": {
                      "anyOf": [
                        {
                          "type": "object",
                          "properties": {
                            "status": {
                              "type": [
                                "string",
                                "null"
                              ],
                              "description": "配置状态"
                            },
                            "basis": {
                              "type": [
                                "string",
                                "null"
                              ],
                              "description": "适用或计算依据"
                            },
                            "description": {
                              "type": [
                                "string",
                                "null"
                              ],
                              "description": "说明"
                            },
                            "cloudNotice": {
                              "type": [
                                "string",
                                "null"
                              ],
                              "description": "云仓配送时间不固定的说明"
                            }
                          },
                          "required": [
                            "status",
                            "basis",
                            "description"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "null"
                        }
                      ],
                      "description": "配送配置说明，库存不是到货承诺"
                    },
                    "purchaseOptions": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "optionId": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "服务端购买标识，原样使用；null 不可提交"
                          },
                          "name": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "名称"
                          },
                          "fulfillment": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "自营、联营、零售或云仓"
                          },
                          "unit": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "份数单位"
                          },
                          "baseUnit": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "基本数量单位"
                          },
                          "priceCondition": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "折扣价适用说明"
                          },
                          "reason": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "不可用或受限原因；null 表示无补充原因"
                          },
                          "packageKind": {
                            "type": "string",
                            "enum": [
                              "big",
                              "small",
                              "scattered"
                            ],
                            "description": "big 整箱；small 小包；scattered 散装"
                          },
                          "quantityPerPackage": {
                            "type": "string",
                            "pattern": "^-?\\d+(\\.\\d+)?$",
                            "description": "十进制字符串；保持服务端精度，null 不是 0"
                          },
                          "minCount": {
                            "type": "string",
                            "pattern": "^-?\\d+(\\.\\d+)?$",
                            "description": "十进制字符串；保持服务端精度，null 不是 0"
                          },
                          "minimumQuantity": {
                            "type": "string",
                            "pattern": "^-?\\d+(\\.\\d+)?$",
                            "description": "十进制字符串；保持服务端精度，null 不是 0"
                          },
                          "customerUnitPrice": {
                            "anyOf": [
                              {
                                "type": "string",
                                "pattern": "^-?\\d+(\\.\\d+)?$",
                                "description": "十进制字符串；保持服务端精度，null 不是 0"
                              },
                              {
                                "type": "null"
                              }
                            ],
                            "description": "十进制字符串；保持服务端精度，null 不是 0"
                          },
                          "discountedUnitPrice": {
                            "anyOf": [
                              {
                                "type": "string",
                                "pattern": "^-?\\d+(\\.\\d+)?$",
                                "description": "十进制字符串；保持服务端精度，null 不是 0"
                              },
                              {
                                "type": "null"
                              }
                            ],
                            "description": "十进制字符串；保持服务端精度，null 不是 0"
                          },
                          "stockQuantity": {
                            "anyOf": [
                              {
                                "type": "string",
                                "pattern": "^-?\\d+(\\.\\d+)?$",
                                "description": "十进制字符串；保持服务端精度，null 不是 0"
                              },
                              {
                                "type": "null"
                              }
                            ],
                            "description": "十进制字符串；保持服务端精度，null 不是 0"
                          },
                          "visibility": {
                            "type": "string",
                            "enum": [
                              "visible",
                              "loginRequired",
                              "unavailable"
                            ],
                            "description": "visible 可见；loginRequired 需登录；unavailable 无法确认"
                          },
                          "purchasable": {
                            "type": "boolean",
                            "description": "当前是否可购买"
                          },
                          "fees": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "kind": {
                                  "type": [
                                    "string",
                                    "null"
                                  ],
                                  "description": "规则或活动类型"
                                },
                                "name": {
                                  "type": [
                                    "string",
                                    "null"
                                  ],
                                  "description": "名称"
                                },
                                "status": {
                                  "type": [
                                    "string",
                                    "null"
                                  ],
                                  "description": "配置状态"
                                },
                                "basis": {
                                  "type": [
                                    "string",
                                    "null"
                                  ],
                                  "description": "适用或计算依据"
                                },
                                "ratePercent": {
                                  "type": [
                                    "string",
                                    "null"
                                  ],
                                  "description": "百分数费率"
                                },
                                "amount": {
                                  "type": [
                                    "string",
                                    "null"
                                  ],
                                  "description": "人民币金额，十进制字符串；null 为未知或不适用"
                                },
                                "description": {
                                  "type": [
                                    "string",
                                    "null"
                                  ],
                                  "description": "说明"
                                }
                              },
                              "required": [
                                "kind",
                                "name",
                                "status",
                                "basis",
                                "ratePercent",
                                "amount",
                                "description"
                              ],
                              "additionalProperties": false
                            },
                            "description": "费用规则"
                          }
                        },
                        "required": [
                          "optionId",
                          "name",
                          "fulfillment",
                          "unit",
                          "baseUnit",
                          "priceCondition",
                          "reason",
                          "packageKind",
                          "quantityPerPackage",
                          "minCount",
                          "minimumQuantity",
                          "customerUnitPrice",
                          "discountedUnitPrice",
                          "stockQuantity",
                          "visibility",
                          "purchasable"
                        ],
                        "additionalProperties": false
                      },
                      "description": "当前购买选项"
                    }
                  },
                  "required": [
                    "gId",
                    "name",
                    "brand",
                    "specification",
                    "imageUrl",
                    "detailUrl",
                    "priceUnit",
                    "reason",
                    "customerUnitPrice",
                    "visibility",
                    "delivery",
                    "purchaseOptions"
                  ],
                  "additionalProperties": false,
                  "description": "购物车商品"
                },
                "selections": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "optionId": {
                        "type": [
                          "string",
                          "null"
                        ],
                        "description": "服务端购买标识，原样使用；null 不可提交"
                      },
                      "count": {
                        "type": [
                          "string",
                          "null"
                        ],
                        "description": "整数份数，输出为十进制字符串"
                      },
                      "name": {
                        "type": [
                          "string",
                          "null"
                        ],
                        "description": "名称"
                      }
                    },
                    "required": [
                      "optionId",
                      "count",
                      "name"
                    ],
                    "additionalProperties": false
                  },
                  "description": "当前选项及份数"
                }
              },
              "required": [
                "itemId",
                "reason",
                "editable",
                "removable",
                "product",
                "selections"
              ],
              "additionalProperties": false
            },
            "description": "本次返回项或参与预览的完整集合"
          },
          "preview": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "items": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "gId": {
                          "type": "integer",
                          "minimum": 1,
                          "maximum": 2147483647,
                          "description": "搜索返回的商品 SKU，不使用散装内部 SKU"
                        },
                        "optionId": {
                          "type": "string",
                          "description": "服务端购买标识，原样使用；null 不可提交"
                        },
                        "count": {
                          "type": "string",
                          "pattern": "^-?\\d+(\\.\\d+)?$",
                          "description": "十进制字符串；保持服务端精度，null 不是 0"
                        },
                        "quantity": {
                          "type": "string",
                          "pattern": "^-?\\d+(\\.\\d+)?$",
                          "description": "十进制字符串；保持服务端精度，null 不是 0"
                        },
                        "customerUnitPrice": {
                          "type": "string",
                          "pattern": "^-?\\d+(\\.\\d+)?$",
                          "description": "十进制字符串；保持服务端精度，null 不是 0"
                        },
                        "unitPrice": {
                          "type": "string",
                          "pattern": "^-?\\d+(\\.\\d+)?$",
                          "description": "十进制字符串；保持服务端精度，null 不是 0"
                        },
                        "goodsAmount": {
                          "type": "string",
                          "pattern": "^-?\\d+(\\.\\d+)?$",
                          "description": "十进制字符串；保持服务端精度，null 不是 0"
                        },
                        "discountAmount": {
                          "type": "string",
                          "pattern": "^-?\\d+(\\.\\d+)?$",
                          "description": "十进制字符串；保持服务端精度，null 不是 0"
                        },
                        "unpackingFee": {
                          "type": "string",
                          "pattern": "^-?\\d+(\\.\\d+)?$",
                          "description": "十进制字符串；保持服务端精度，null 不是 0"
                        },
                        "retailFee": {
                          "type": "string",
                          "pattern": "^-?\\d+(\\.\\d+)?$",
                          "description": "十进制字符串；保持服务端精度，null 不是 0"
                        },
                        "total": {
                          "type": "string",
                          "pattern": "^-?\\d+(\\.\\d+)?$",
                          "description": "十进制字符串；保持服务端精度，null 不是 0"
                        },
                        "baseUnit": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "基本数量单位"
                        },
                        "unpackingFeeBasis": {
                          "anyOf": [
                            {
                              "type": "string",
                              "pattern": "^-?\\d+(\\.\\d+)?$",
                              "description": "十进制字符串；保持服务端精度，null 不是 0"
                            },
                            {
                              "type": "null"
                            }
                          ],
                          "description": "十进制字符串；保持服务端精度，null 不是 0"
                        },
                        "unpackingFeeRatePercent": {
                          "anyOf": [
                            {
                              "type": "string",
                              "pattern": "^-?\\d+(\\.\\d+)?$",
                              "description": "十进制字符串；保持服务端精度，null 不是 0"
                            },
                            {
                              "type": "null"
                            }
                          ],
                          "description": "十进制字符串；保持服务端精度，null 不是 0"
                        }
                      },
                      "required": [
                        "gId",
                        "optionId",
                        "count",
                        "quantity",
                        "customerUnitPrice",
                        "unitPrice",
                        "goodsAmount",
                        "discountAmount",
                        "unpackingFee",
                        "retailFee",
                        "total",
                        "baseUnit",
                        "unpackingFeeBasis",
                        "unpackingFeeRatePercent"
                      ],
                      "additionalProperties": false
                    },
                    "description": "本次返回项或参与预览的完整集合"
                  },
                  "goodsAmount": {
                    "type": "string",
                    "pattern": "^-?\\d+(\\.\\d+)?$",
                    "description": "十进制字符串；保持服务端精度，null 不是 0"
                  },
                  "discountAmount": {
                    "type": "string",
                    "pattern": "^-?\\d+(\\.\\d+)?$",
                    "description": "十进制字符串；保持服务端精度，null 不是 0"
                  },
                  "unpackingFee": {
                    "type": "string",
                    "pattern": "^-?\\d+(\\.\\d+)?$",
                    "description": "十进制字符串；保持服务端精度，null 不是 0"
                  },
                  "retailFee": {
                    "type": "string",
                    "pattern": "^-?\\d+(\\.\\d+)?$",
                    "description": "十进制字符串；保持服务端精度，null 不是 0"
                  },
                  "total": {
                    "type": "string",
                    "pattern": "^-?\\d+(\\.\\d+)?$",
                    "description": "十进制字符串；保持服务端精度，null 不是 0"
                  },
                  "promotions": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "activityId": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "活动 ID，仅说明核对，不能提交指定活动"
                        },
                        "name": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "名称"
                        },
                        "discountAmount": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "优惠金额"
                        },
                        "goodsIds": {
                          "type": "array",
                          "items": {
                            "type": "integer",
                            "minimum": 1,
                            "maximum": 2147483647,
                            "description": "搜索返回的商品 SKU，不使用散装内部 SKU"
                          },
                          "description": "适用商品 ID"
                        }
                      },
                      "required": [
                        "activityId",
                        "name",
                        "discountAmount",
                        "goodsIds"
                      ],
                      "additionalProperties": false
                    },
                    "description": "商品可用活动或预览实际使用活动"
                  },
                  "restrictions": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "kind": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "规则或活动类型"
                        },
                        "message": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "业务结果或限制说明"
                        },
                        "requiredAmount": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "要求达到的金额"
                        },
                        "currentAmount": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "当前参与门槛的金额"
                        },
                        "goodsIds": {
                          "type": "array",
                          "items": {
                            "type": "integer",
                            "minimum": 1,
                            "maximum": 2147483647,
                            "description": "搜索返回的商品 SKU，不使用散装内部 SKU"
                          },
                          "description": "适用商品 ID"
                        }
                      },
                      "required": [
                        "kind",
                        "message",
                        "requiredAmount",
                        "currentAmount",
                        "goodsIds"
                      ],
                      "additionalProperties": false
                    },
                    "description": "适用分组门槛"
                  },
                  "calculatedAt": {
                    "type": "string",
                    "description": "完整计算完成的 UTC 时间"
                  },
                  "complete": {
                    "type": "boolean",
                    "const": true,
                    "description": "成功必须为 true，不返回近似或部分计算"
                  },
                  "explanation": {
                    "type": "string",
                    "description": "预览范围说明"
                  },
                  "excluded": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "description": "未包含的费用项目"
                  }
                },
                "required": [
                  "items",
                  "goodsAmount",
                  "discountAmount",
                  "unpackingFee",
                  "retailFee",
                  "total",
                  "promotions",
                  "restrictions",
                  "calculatedAt",
                  "complete",
                  "explanation",
                  "excluded"
                ],
                "additionalProperties": false
              },
              {
                "type": "null"
              }
            ],
            "description": "当前返回集合的完整费用预览；null 时看 previewError"
          },
          "previewError": {
            "type": [
              "string",
              "null"
            ],
            "description": "费用无法完整计算的原因"
          },
          "previewScope": {
            "type": "string",
            "const": "returnedItems",
            "description": "固定 returnedItems，仅覆盖本次返回项"
          },
          "cartUrl": {
            "type": "string",
            "format": "uri",
            "description": "客户人工结算的购物车入口"
          }
        },
        "required": [
          "items",
          "preview",
          "previewError",
          "previewScope",
          "cartUrl"
        ],
        "additionalProperties": false,
        "$schema": "http://json-schema.org/draft-07/schema#"
      },
      "title": "get_cart",
      "annotations": {
        "readOnlyHint": true,
        "destructiveHint": false,
        "idempotentHint": true,
        "openWorldHint": false
      }
    },
    {
      "name": "add_to_cart",
      "description": "按用户意愿追加选项份数，不覆盖其他选项；先查询购物车及商品详情。超时先查车，原 ID 原参数查询回执。 AI 可以帮助查询商品、预览费用、加入购物车、修改份数和删除购物车商品。如需下单，请客户自行打开商城购物车，核对商品、数量和费用，人工进行结算和支付。目前不支持 AI 下单或支付接口。 写入看 receipt.applied/receiptSaved；cartReadError 或 cart.previewError 不代表写入失败，禁止自动换 ID 重试。",
      "inputSchema": {
        "type": "object",
        "properties": {
          "requestId": {
            "type": "string",
            "pattern": "^[A-Za-z0-9_-]{8,100}$",
            "description": "同一业务意图及重试保持同一 ID，保留 366 天；不确定时先查询购物车，禁止自动换 ID 重试"
          },
          "gId": {
            "type": "integer",
            "minimum": 1,
            "maximum": 2147483647,
            "description": "搜索返回的商品 SKU，不使用散装内部 SKU"
          },
          "optionId": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100,
            "description": "详情返回的购买选项 optionId，原样使用，不解析或拼接"
          },
          "count": {
            "type": "integer",
            "minimum": 1,
            "maximum": 1000000000,
            "description": "购买选项的整数份数，不是基本数量"
          },
          "accessToken": {
            "type": "string",
            "minLength": 1,
            "maxLength": 8192,
            "description": "仅账号密码直登 Token 的兼容参数。优先使用 Authorization: Bearer；OAuth Token 只能放请求头。不得传官网 Token"
          }
        },
        "required": [
          "requestId",
          "gId",
          "optionId",
          "count"
        ],
        "additionalProperties": false,
        "$schema": "http://json-schema.org/draft-07/schema#"
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "receipt": {
            "type": "object",
            "properties": {
              "applied": {
                "type": [
                  "boolean",
                  "null"
                ],
                "description": "true 已修改，false 未修改，null 执行中或未知"
              },
              "uncertain": {
                "type": "boolean",
                "description": "结果存在不确定性，应先查询核对，禁止换 ID 重试"
              },
              "receiptSaved": {
                "type": "boolean",
                "description": "回执是否确认保存"
              },
              "message": {
                "type": "string",
                "description": "业务结果或限制说明"
              },
              "affected": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "itemId": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "购物车不透明标识，原样使用"
                    },
                    "gId": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 2147483647,
                      "description": "商品 SKU ID"
                    },
                    "reason": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "不可用或受限原因；null 表示无补充原因"
                    }
                  },
                  "required": [
                    "itemId",
                    "gId",
                    "reason"
                  ],
                  "additionalProperties": false
                },
                "description": "实际受影响商品"
              },
              "retained": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "itemId": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "购物车不透明标识，原样使用"
                    },
                    "gId": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 2147483647,
                      "description": "商品 SKU ID"
                    },
                    "reason": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "不可用或受限原因；null 表示无补充原因"
                    }
                  },
                  "required": [
                    "itemId",
                    "gId",
                    "reason"
                  ],
                  "additionalProperties": false
                },
                "description": "保留项及原因"
              }
            },
            "required": [
              "applied",
              "uncertain",
              "receiptSaved",
              "message",
              "affected",
              "retained"
            ],
            "additionalProperties": false,
            "description": "业务写入回执，与刷新结果分开判断"
          },
          "cart": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "items": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "itemId": {
                          "type": "string",
                          "description": "购物车不透明标识，原样使用"
                        },
                        "reason": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "不可用或受限原因；null 表示无补充原因"
                        },
                        "editable": {
                          "type": "boolean",
                          "description": "是否可改量"
                        },
                        "removable": {
                          "type": "boolean",
                          "description": "是否可删除"
                        },
                        "product": {
                          "type": "object",
                          "properties": {
                            "gId": {
                              "type": "integer",
                              "minimum": 1,
                              "maximum": 2147483647,
                              "description": "搜索返回的商品 SKU，不使用散装内部 SKU"
                            },
                            "name": {
                              "type": [
                                "string",
                                "null"
                              ],
                              "description": "名称"
                            },
                            "brand": {
                              "type": [
                                "string",
                                "null"
                              ],
                              "description": "商品品牌"
                            },
                            "specification": {
                              "type": [
                                "string",
                                "null"
                              ],
                              "description": "规格"
                            },
                            "imageUrl": {
                              "type": [
                                "string",
                                "null"
                              ],
                              "description": "商品图片地址"
                            },
                            "detailUrl": {
                              "type": [
                                "string",
                                "null"
                              ],
                              "description": "商城人工查看入口"
                            },
                            "priceUnit": {
                              "type": [
                                "string",
                                "null"
                              ],
                              "description": "基本计价单位"
                            },
                            "reason": {
                              "type": [
                                "string",
                                "null"
                              ],
                              "description": "不可用或受限原因；null 表示无补充原因"
                            },
                            "customerUnitPrice": {
                              "anyOf": [
                                {
                                  "type": "string",
                                  "pattern": "^-?\\d+(\\.\\d+)?$",
                                  "description": "十进制字符串；保持服务端精度，null 不是 0"
                                },
                                {
                                  "type": "null"
                                }
                              ],
                              "description": "十进制字符串；保持服务端精度，null 不是 0"
                            },
                            "visibility": {
                              "type": "string",
                              "enum": [
                                "visible",
                                "loginRequired",
                                "unavailable"
                              ],
                              "description": "visible 可见；loginRequired 需登录；unavailable 无法确认"
                            },
                            "attributes": {
                              "type": "object",
                              "additionalProperties": {
                                "type": "string"
                              },
                              "description": "中文商品属性名及值"
                            },
                            "delivery": {
                              "anyOf": [
                                {
                                  "type": "object",
                                  "properties": {
                                    "status": {
                                      "type": [
                                        "string",
                                        "null"
                                      ],
                                      "description": "配置状态"
                                    },
                                    "basis": {
                                      "type": [
                                        "string",
                                        "null"
                                      ],
                                      "description": "适用或计算依据"
                                    },
                                    "description": {
                                      "type": [
                                        "string",
                                        "null"
                                      ],
                                      "description": "说明"
                                    },
                                    "cloudNotice": {
                                      "type": [
                                        "string",
                                        "null"
                                      ],
                                      "description": "云仓配送时间不固定的说明"
                                    }
                                  },
                                  "required": [
                                    "status",
                                    "basis",
                                    "description"
                                  ],
                                  "additionalProperties": false
                                },
                                {
                                  "type": "null"
                                }
                              ],
                              "description": "配送配置说明，库存不是到货承诺"
                            },
                            "purchaseOptions": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "optionId": {
                                    "type": [
                                      "string",
                                      "null"
                                    ],
                                    "description": "服务端购买标识，原样使用；null 不可提交"
                                  },
                                  "name": {
                                    "type": [
                                      "string",
                                      "null"
                                    ],
                                    "description": "名称"
                                  },
                                  "fulfillment": {
                                    "type": [
                                      "string",
                                      "null"
                                    ],
                                    "description": "自营、联营、零售或云仓"
                                  },
                                  "unit": {
                                    "type": [
                                      "string",
                                      "null"
                                    ],
                                    "description": "份数单位"
                                  },
                                  "baseUnit": {
                                    "type": [
                                      "string",
                                      "null"
                                    ],
                                    "description": "基本数量单位"
                                  },
                                  "priceCondition": {
                                    "type": [
                                      "string",
                                      "null"
                                    ],
                                    "description": "折扣价适用说明"
                                  },
                                  "reason": {
                                    "type": [
                                      "string",
                                      "null"
                                    ],
                                    "description": "不可用或受限原因；null 表示无补充原因"
                                  },
                                  "packageKind": {
                                    "type": "string",
                                    "enum": [
                                      "big",
                                      "small",
                                      "scattered"
                                    ],
                                    "description": "big 整箱；small 小包；scattered 散装"
                                  },
                                  "quantityPerPackage": {
                                    "type": "string",
                                    "pattern": "^-?\\d+(\\.\\d+)?$",
                                    "description": "十进制字符串；保持服务端精度，null 不是 0"
                                  },
                                  "minCount": {
                                    "type": "string",
                                    "pattern": "^-?\\d+(\\.\\d+)?$",
                                    "description": "十进制字符串；保持服务端精度，null 不是 0"
                                  },
                                  "minimumQuantity": {
                                    "type": "string",
                                    "pattern": "^-?\\d+(\\.\\d+)?$",
                                    "description": "十进制字符串；保持服务端精度，null 不是 0"
                                  },
                                  "customerUnitPrice": {
                                    "anyOf": [
                                      {
                                        "type": "string",
                                        "pattern": "^-?\\d+(\\.\\d+)?$",
                                        "description": "十进制字符串；保持服务端精度，null 不是 0"
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ],
                                    "description": "十进制字符串；保持服务端精度，null 不是 0"
                                  },
                                  "discountedUnitPrice": {
                                    "anyOf": [
                                      {
                                        "type": "string",
                                        "pattern": "^-?\\d+(\\.\\d+)?$",
                                        "description": "十进制字符串；保持服务端精度，null 不是 0"
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ],
                                    "description": "十进制字符串；保持服务端精度，null 不是 0"
                                  },
                                  "stockQuantity": {
                                    "anyOf": [
                                      {
                                        "type": "string",
                                        "pattern": "^-?\\d+(\\.\\d+)?$",
                                        "description": "十进制字符串；保持服务端精度，null 不是 0"
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ],
                                    "description": "十进制字符串；保持服务端精度，null 不是 0"
                                  },
                                  "visibility": {
                                    "type": "string",
                                    "enum": [
                                      "visible",
                                      "loginRequired",
                                      "unavailable"
                                    ],
                                    "description": "visible 可见；loginRequired 需登录；unavailable 无法确认"
                                  },
                                  "purchasable": {
                                    "type": "boolean",
                                    "description": "当前是否可购买"
                                  },
                                  "fees": {
                                    "type": "array",
                                    "items": {
                                      "type": "object",
                                      "properties": {
                                        "kind": {
                                          "type": [
                                            "string",
                                            "null"
                                          ],
                                          "description": "规则或活动类型"
                                        },
                                        "name": {
                                          "type": [
                                            "string",
                                            "null"
                                          ],
                                          "description": "名称"
                                        },
                                        "status": {
                                          "type": [
                                            "string",
                                            "null"
                                          ],
                                          "description": "配置状态"
                                        },
                                        "basis": {
                                          "type": [
                                            "string",
                                            "null"
                                          ],
                                          "description": "适用或计算依据"
                                        },
                                        "ratePercent": {
                                          "type": [
                                            "string",
                                            "null"
                                          ],
                                          "description": "百分数费率"
                                        },
                                        "amount": {
                                          "type": [
                                            "string",
                                            "null"
                                          ],
                                          "description": "人民币金额，十进制字符串；null 为未知或不适用"
                                        },
                                        "description": {
                                          "type": [
                                            "string",
                                            "null"
                                          ],
                                          "description": "说明"
                                        }
                                      },
                                      "required": [
                                        "kind",
                                        "name",
                                        "status",
                                        "basis",
                                        "ratePercent",
                                        "amount",
                                        "description"
                                      ],
                                      "additionalProperties": false
                                    },
                                    "description": "费用规则"
                                  }
                                },
                                "required": [
                                  "optionId",
                                  "name",
                                  "fulfillment",
                                  "unit",
                                  "baseUnit",
                                  "priceCondition",
                                  "reason",
                                  "packageKind",
                                  "quantityPerPackage",
                                  "minCount",
                                  "minimumQuantity",
                                  "customerUnitPrice",
                                  "discountedUnitPrice",
                                  "stockQuantity",
                                  "visibility",
                                  "purchasable"
                                ],
                                "additionalProperties": false
                              },
                              "description": "当前购买选项"
                            }
                          },
                          "required": [
                            "gId",
                            "name",
                            "brand",
                            "specification",
                            "imageUrl",
                            "detailUrl",
                            "priceUnit",
                            "reason",
                            "customerUnitPrice",
                            "visibility",
                            "delivery",
                            "purchaseOptions"
                          ],
                          "additionalProperties": false,
                          "description": "购物车商品"
                        },
                        "selections": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "optionId": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "description": "服务端购买标识，原样使用；null 不可提交"
                              },
                              "count": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "description": "整数份数，输出为十进制字符串"
                              },
                              "name": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "description": "名称"
                              }
                            },
                            "required": [
                              "optionId",
                              "count",
                              "name"
                            ],
                            "additionalProperties": false
                          },
                          "description": "当前选项及份数"
                        }
                      },
                      "required": [
                        "itemId",
                        "reason",
                        "editable",
                        "removable",
                        "product",
                        "selections"
                      ],
                      "additionalProperties": false
                    },
                    "description": "本次返回项或参与预览的完整集合"
                  },
                  "preview": {
                    "anyOf": [
                      {
                        "type": "object",
                        "properties": {
                          "items": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "gId": {
                                  "type": "integer",
                                  "minimum": 1,
                                  "maximum": 2147483647,
                                  "description": "搜索返回的商品 SKU，不使用散装内部 SKU"
                                },
                                "optionId": {
                                  "type": "string",
                                  "description": "服务端购买标识，原样使用；null 不可提交"
                                },
                                "count": {
                                  "type": "string",
                                  "pattern": "^-?\\d+(\\.\\d+)?$",
                                  "description": "十进制字符串；保持服务端精度，null 不是 0"
                                },
                                "quantity": {
                                  "type": "string",
                                  "pattern": "^-?\\d+(\\.\\d+)?$",
                                  "description": "十进制字符串；保持服务端精度，null 不是 0"
                                },
                                "customerUnitPrice": {
                                  "type": "string",
                                  "pattern": "^-?\\d+(\\.\\d+)?$",
                                  "description": "十进制字符串；保持服务端精度，null 不是 0"
                                },
                                "unitPrice": {
                                  "type": "string",
                                  "pattern": "^-?\\d+(\\.\\d+)?$",
                                  "description": "十进制字符串；保持服务端精度，null 不是 0"
                                },
                                "goodsAmount": {
                                  "type": "string",
                                  "pattern": "^-?\\d+(\\.\\d+)?$",
                                  "description": "十进制字符串；保持服务端精度，null 不是 0"
                                },
                                "discountAmount": {
                                  "type": "string",
                                  "pattern": "^-?\\d+(\\.\\d+)?$",
                                  "description": "十进制字符串；保持服务端精度，null 不是 0"
                                },
                                "unpackingFee": {
                                  "type": "string",
                                  "pattern": "^-?\\d+(\\.\\d+)?$",
                                  "description": "十进制字符串；保持服务端精度，null 不是 0"
                                },
                                "retailFee": {
                                  "type": "string",
                                  "pattern": "^-?\\d+(\\.\\d+)?$",
                                  "description": "十进制字符串；保持服务端精度，null 不是 0"
                                },
                                "total": {
                                  "type": "string",
                                  "pattern": "^-?\\d+(\\.\\d+)?$",
                                  "description": "十进制字符串；保持服务端精度，null 不是 0"
                                },
                                "baseUnit": {
                                  "type": [
                                    "string",
                                    "null"
                                  ],
                                  "description": "基本数量单位"
                                },
                                "unpackingFeeBasis": {
                                  "anyOf": [
                                    {
                                      "type": "string",
                                      "pattern": "^-?\\d+(\\.\\d+)?$",
                                      "description": "十进制字符串；保持服务端精度，null 不是 0"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ],
                                  "description": "十进制字符串；保持服务端精度，null 不是 0"
                                },
                                "unpackingFeeRatePercent": {
                                  "anyOf": [
                                    {
                                      "type": "string",
                                      "pattern": "^-?\\d+(\\.\\d+)?$",
                                      "description": "十进制字符串；保持服务端精度，null 不是 0"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ],
                                  "description": "十进制字符串；保持服务端精度，null 不是 0"
                                }
                              },
                              "required": [
                                "gId",
                                "optionId",
                                "count",
                                "quantity",
                                "customerUnitPrice",
                                "unitPrice",
                                "goodsAmount",
                                "discountAmount",
                                "unpackingFee",
                                "retailFee",
                                "total",
                                "baseUnit",
                                "unpackingFeeBasis",
                                "unpackingFeeRatePercent"
                              ],
                              "additionalProperties": false
                            },
                            "description": "本次返回项或参与预览的完整集合"
                          },
                          "goodsAmount": {
                            "type": "string",
                            "pattern": "^-?\\d+(\\.\\d+)?$",
                            "description": "十进制字符串；保持服务端精度，null 不是 0"
                          },
                          "discountAmount": {
                            "type": "string",
                            "pattern": "^-?\\d+(\\.\\d+)?$",
                            "description": "十进制字符串；保持服务端精度，null 不是 0"
                          },
                          "unpackingFee": {
                            "type": "string",
                            "pattern": "^-?\\d+(\\.\\d+)?$",
                            "description": "十进制字符串；保持服务端精度，null 不是 0"
                          },
                          "retailFee": {
                            "type": "string",
                            "pattern": "^-?\\d+(\\.\\d+)?$",
                            "description": "十进制字符串；保持服务端精度，null 不是 0"
                          },
                          "total": {
                            "type": "string",
                            "pattern": "^-?\\d+(\\.\\d+)?$",
                            "description": "十进制字符串；保持服务端精度，null 不是 0"
                          },
                          "promotions": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "activityId": {
                                  "type": [
                                    "string",
                                    "null"
                                  ],
                                  "description": "活动 ID，仅说明核对，不能提交指定活动"
                                },
                                "name": {
                                  "type": [
                                    "string",
                                    "null"
                                  ],
                                  "description": "名称"
                                },
                                "discountAmount": {
                                  "type": [
                                    "string",
                                    "null"
                                  ],
                                  "description": "优惠金额"
                                },
                                "goodsIds": {
                                  "type": "array",
                                  "items": {
                                    "type": "integer",
                                    "minimum": 1,
                                    "maximum": 2147483647,
                                    "description": "搜索返回的商品 SKU，不使用散装内部 SKU"
                                  },
                                  "description": "适用商品 ID"
                                }
                              },
                              "required": [
                                "activityId",
                                "name",
                                "discountAmount",
                                "goodsIds"
                              ],
                              "additionalProperties": false
                            },
                            "description": "商品可用活动或预览实际使用活动"
                          },
                          "restrictions": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "kind": {
                                  "type": [
                                    "string",
                                    "null"
                                  ],
                                  "description": "规则或活动类型"
                                },
                                "message": {
                                  "type": [
                                    "string",
                                    "null"
                                  ],
                                  "description": "业务结果或限制说明"
                                },
                                "requiredAmount": {
                                  "type": [
                                    "string",
                                    "null"
                                  ],
                                  "description": "要求达到的金额"
                                },
                                "currentAmount": {
                                  "type": [
                                    "string",
                                    "null"
                                  ],
                                  "description": "当前参与门槛的金额"
                                },
                                "goodsIds": {
                                  "type": "array",
                                  "items": {
                                    "type": "integer",
                                    "minimum": 1,
                                    "maximum": 2147483647,
                                    "description": "搜索返回的商品 SKU，不使用散装内部 SKU"
                                  },
                                  "description": "适用商品 ID"
                                }
                              },
                              "required": [
                                "kind",
                                "message",
                                "requiredAmount",
                                "currentAmount",
                                "goodsIds"
                              ],
                              "additionalProperties": false
                            },
                            "description": "适用分组门槛"
                          },
                          "calculatedAt": {
                            "type": "string",
                            "description": "完整计算完成的 UTC 时间"
                          },
                          "complete": {
                            "type": "boolean",
                            "const": true,
                            "description": "成功必须为 true，不返回近似或部分计算"
                          },
                          "explanation": {
                            "type": "string",
                            "description": "预览范围说明"
                          },
                          "excluded": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            },
                            "description": "未包含的费用项目"
                          }
                        },
                        "required": [
                          "items",
                          "goodsAmount",
                          "discountAmount",
                          "unpackingFee",
                          "retailFee",
                          "total",
                          "promotions",
                          "restrictions",
                          "calculatedAt",
                          "complete",
                          "explanation",
                          "excluded"
                        ],
                        "additionalProperties": false
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "description": "当前返回集合的完整费用预览；null 时看 previewError"
                  },
                  "previewError": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "description": "费用无法完整计算的原因"
                  },
                  "previewScope": {
                    "type": "string",
                    "const": "returnedItems",
                    "description": "固定 returnedItems，仅覆盖本次返回项"
                  },
                  "cartUrl": {
                    "type": "string",
                    "format": "uri",
                    "description": "客户人工结算的购物车入口"
                  }
                },
                "required": [
                  "items",
                  "preview",
                  "previewError",
                  "previewScope",
                  "cartUrl"
                ],
                "additionalProperties": false
              },
              {
                "type": "null"
              }
            ],
            "description": "写入后的购物车快照；null 不代表写入失败"
          },
          "cartReadError": {
            "type": [
              "string",
              "null"
            ],
            "description": "购物车刷新错误，不改变业务回执"
          },
          "guidance": {
            "type": "string",
            "description": "人工结算和重试指引"
          }
        },
        "required": [
          "receipt",
          "cart",
          "cartReadError",
          "guidance"
        ],
        "additionalProperties": false,
        "$schema": "http://json-schema.org/draft-07/schema#"
      },
      "title": "add_to_cart",
      "annotations": {
        "readOnlyHint": false,
        "destructiveHint": false,
        "idempotentHint": true,
        "openWorldHint": false
      }
    },
    {
      "name": "update_cart",
      "description": "按用户意愿设置所选购买方式的目标份数；0 清除该选项，其他选项保留。旧包装无法解释时由用户核对删除重选。 AI 可以帮助查询商品、预览费用、加入购物车、修改份数和删除购物车商品。如需下单，请客户自行打开商城购物车，核对商品、数量和费用，人工进行结算和支付。目前不支持 AI 下单或支付接口。 写入看 receipt.applied/receiptSaved；cartReadError 或 cart.previewError 不代表写入失败，禁止自动换 ID 重试。",
      "inputSchema": {
        "type": "object",
        "properties": {
          "requestId": {
            "type": "string",
            "pattern": "^[A-Za-z0-9_-]{8,100}$",
            "description": "同一业务意图及重试保持同一 ID，保留 366 天；不确定时先查询购物车，禁止自动换 ID 重试"
          },
          "itemId": {
            "type": "string",
            "minLength": 1,
            "maxLength": 80,
            "description": "购物车返回的 itemId，原样使用，不解析或拼接"
          },
          "optionId": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100,
            "description": "详情返回的购买选项 optionId，原样使用，不解析或拼接"
          },
          "count": {
            "type": "integer",
            "minimum": 0,
            "maximum": 1000000000,
            "description": "所选购买方式的目标份数，0 清除该选项"
          },
          "accessToken": {
            "type": "string",
            "minLength": 1,
            "maxLength": 8192,
            "description": "仅账号密码直登 Token 的兼容参数。优先使用 Authorization: Bearer；OAuth Token 只能放请求头。不得传官网 Token"
          }
        },
        "required": [
          "requestId",
          "itemId",
          "optionId",
          "count"
        ],
        "additionalProperties": false,
        "$schema": "http://json-schema.org/draft-07/schema#"
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "receipt": {
            "type": "object",
            "properties": {
              "applied": {
                "type": [
                  "boolean",
                  "null"
                ],
                "description": "true 已修改，false 未修改，null 执行中或未知"
              },
              "uncertain": {
                "type": "boolean",
                "description": "结果存在不确定性，应先查询核对，禁止换 ID 重试"
              },
              "receiptSaved": {
                "type": "boolean",
                "description": "回执是否确认保存"
              },
              "message": {
                "type": "string",
                "description": "业务结果或限制说明"
              },
              "affected": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "itemId": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "购物车不透明标识，原样使用"
                    },
                    "gId": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 2147483647,
                      "description": "商品 SKU ID"
                    },
                    "reason": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "不可用或受限原因；null 表示无补充原因"
                    }
                  },
                  "required": [
                    "itemId",
                    "gId",
                    "reason"
                  ],
                  "additionalProperties": false
                },
                "description": "实际受影响商品"
              },
              "retained": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "itemId": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "购物车不透明标识，原样使用"
                    },
                    "gId": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 2147483647,
                      "description": "商品 SKU ID"
                    },
                    "reason": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "不可用或受限原因；null 表示无补充原因"
                    }
                  },
                  "required": [
                    "itemId",
                    "gId",
                    "reason"
                  ],
                  "additionalProperties": false
                },
                "description": "保留项及原因"
              }
            },
            "required": [
              "applied",
              "uncertain",
              "receiptSaved",
              "message",
              "affected",
              "retained"
            ],
            "additionalProperties": false,
            "description": "业务写入回执，与刷新结果分开判断"
          },
          "cart": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "items": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "itemId": {
                          "type": "string",
                          "description": "购物车不透明标识，原样使用"
                        },
                        "reason": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "不可用或受限原因；null 表示无补充原因"
                        },
                        "editable": {
                          "type": "boolean",
                          "description": "是否可改量"
                        },
                        "removable": {
                          "type": "boolean",
                          "description": "是否可删除"
                        },
                        "product": {
                          "type": "object",
                          "properties": {
                            "gId": {
                              "type": "integer",
                              "minimum": 1,
                              "maximum": 2147483647,
                              "description": "搜索返回的商品 SKU，不使用散装内部 SKU"
                            },
                            "name": {
                              "type": [
                                "string",
                                "null"
                              ],
                              "description": "名称"
                            },
                            "brand": {
                              "type": [
                                "string",
                                "null"
                              ],
                              "description": "商品品牌"
                            },
                            "specification": {
                              "type": [
                                "string",
                                "null"
                              ],
                              "description": "规格"
                            },
                            "imageUrl": {
                              "type": [
                                "string",
                                "null"
                              ],
                              "description": "商品图片地址"
                            },
                            "detailUrl": {
                              "type": [
                                "string",
                                "null"
                              ],
                              "description": "商城人工查看入口"
                            },
                            "priceUnit": {
                              "type": [
                                "string",
                                "null"
                              ],
                              "description": "基本计价单位"
                            },
                            "reason": {
                              "type": [
                                "string",
                                "null"
                              ],
                              "description": "不可用或受限原因；null 表示无补充原因"
                            },
                            "customerUnitPrice": {
                              "anyOf": [
                                {
                                  "type": "string",
                                  "pattern": "^-?\\d+(\\.\\d+)?$",
                                  "description": "十进制字符串；保持服务端精度，null 不是 0"
                                },
                                {
                                  "type": "null"
                                }
                              ],
                              "description": "十进制字符串；保持服务端精度，null 不是 0"
                            },
                            "visibility": {
                              "type": "string",
                              "enum": [
                                "visible",
                                "loginRequired",
                                "unavailable"
                              ],
                              "description": "visible 可见；loginRequired 需登录；unavailable 无法确认"
                            },
                            "attributes": {
                              "type": "object",
                              "additionalProperties": {
                                "type": "string"
                              },
                              "description": "中文商品属性名及值"
                            },
                            "delivery": {
                              "anyOf": [
                                {
                                  "type": "object",
                                  "properties": {
                                    "status": {
                                      "type": [
                                        "string",
                                        "null"
                                      ],
                                      "description": "配置状态"
                                    },
                                    "basis": {
                                      "type": [
                                        "string",
                                        "null"
                                      ],
                                      "description": "适用或计算依据"
                                    },
                                    "description": {
                                      "type": [
                                        "string",
                                        "null"
                                      ],
                                      "description": "说明"
                                    },
                                    "cloudNotice": {
                                      "type": [
                                        "string",
                                        "null"
                                      ],
                                      "description": "云仓配送时间不固定的说明"
                                    }
                                  },
                                  "required": [
                                    "status",
                                    "basis",
                                    "description"
                                  ],
                                  "additionalProperties": false
                                },
                                {
                                  "type": "null"
                                }
                              ],
                              "description": "配送配置说明，库存不是到货承诺"
                            },
                            "purchaseOptions": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "optionId": {
                                    "type": [
                                      "string",
                                      "null"
                                    ],
                                    "description": "服务端购买标识，原样使用；null 不可提交"
                                  },
                                  "name": {
                                    "type": [
                                      "string",
                                      "null"
                                    ],
                                    "description": "名称"
                                  },
                                  "fulfillment": {
                                    "type": [
                                      "string",
                                      "null"
                                    ],
                                    "description": "自营、联营、零售或云仓"
                                  },
                                  "unit": {
                                    "type": [
                                      "string",
                                      "null"
                                    ],
                                    "description": "份数单位"
                                  },
                                  "baseUnit": {
                                    "type": [
                                      "string",
                                      "null"
                                    ],
                                    "description": "基本数量单位"
                                  },
                                  "priceCondition": {
                                    "type": [
                                      "string",
                                      "null"
                                    ],
                                    "description": "折扣价适用说明"
                                  },
                                  "reason": {
                                    "type": [
                                      "string",
                                      "null"
                                    ],
                                    "description": "不可用或受限原因；null 表示无补充原因"
                                  },
                                  "packageKind": {
                                    "type": "string",
                                    "enum": [
                                      "big",
                                      "small",
                                      "scattered"
                                    ],
                                    "description": "big 整箱；small 小包；scattered 散装"
                                  },
                                  "quantityPerPackage": {
                                    "type": "string",
                                    "pattern": "^-?\\d+(\\.\\d+)?$",
                                    "description": "十进制字符串；保持服务端精度，null 不是 0"
                                  },
                                  "minCount": {
                                    "type": "string",
                                    "pattern": "^-?\\d+(\\.\\d+)?$",
                                    "description": "十进制字符串；保持服务端精度，null 不是 0"
                                  },
                                  "minimumQuantity": {
                                    "type": "string",
                                    "pattern": "^-?\\d+(\\.\\d+)?$",
                                    "description": "十进制字符串；保持服务端精度，null 不是 0"
                                  },
                                  "customerUnitPrice": {
                                    "anyOf": [
                                      {
                                        "type": "string",
                                        "pattern": "^-?\\d+(\\.\\d+)?$",
                                        "description": "十进制字符串；保持服务端精度，null 不是 0"
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ],
                                    "description": "十进制字符串；保持服务端精度，null 不是 0"
                                  },
                                  "discountedUnitPrice": {
                                    "anyOf": [
                                      {
                                        "type": "string",
                                        "pattern": "^-?\\d+(\\.\\d+)?$",
                                        "description": "十进制字符串；保持服务端精度，null 不是 0"
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ],
                                    "description": "十进制字符串；保持服务端精度，null 不是 0"
                                  },
                                  "stockQuantity": {
                                    "anyOf": [
                                      {
                                        "type": "string",
                                        "pattern": "^-?\\d+(\\.\\d+)?$",
                                        "description": "十进制字符串；保持服务端精度，null 不是 0"
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ],
                                    "description": "十进制字符串；保持服务端精度，null 不是 0"
                                  },
                                  "visibility": {
                                    "type": "string",
                                    "enum": [
                                      "visible",
                                      "loginRequired",
                                      "unavailable"
                                    ],
                                    "description": "visible 可见；loginRequired 需登录；unavailable 无法确认"
                                  },
                                  "purchasable": {
                                    "type": "boolean",
                                    "description": "当前是否可购买"
                                  },
                                  "fees": {
                                    "type": "array",
                                    "items": {
                                      "type": "object",
                                      "properties": {
                                        "kind": {
                                          "type": [
                                            "string",
                                            "null"
                                          ],
                                          "description": "规则或活动类型"
                                        },
                                        "name": {
                                          "type": [
                                            "string",
                                            "null"
                                          ],
                                          "description": "名称"
                                        },
                                        "status": {
                                          "type": [
                                            "string",
                                            "null"
                                          ],
                                          "description": "配置状态"
                                        },
                                        "basis": {
                                          "type": [
                                            "string",
                                            "null"
                                          ],
                                          "description": "适用或计算依据"
                                        },
                                        "ratePercent": {
                                          "type": [
                                            "string",
                                            "null"
                                          ],
                                          "description": "百分数费率"
                                        },
                                        "amount": {
                                          "type": [
                                            "string",
                                            "null"
                                          ],
                                          "description": "人民币金额，十进制字符串；null 为未知或不适用"
                                        },
                                        "description": {
                                          "type": [
                                            "string",
                                            "null"
                                          ],
                                          "description": "说明"
                                        }
                                      },
                                      "required": [
                                        "kind",
                                        "name",
                                        "status",
                                        "basis",
                                        "ratePercent",
                                        "amount",
                                        "description"
                                      ],
                                      "additionalProperties": false
                                    },
                                    "description": "费用规则"
                                  }
                                },
                                "required": [
                                  "optionId",
                                  "name",
                                  "fulfillment",
                                  "unit",
                                  "baseUnit",
                                  "priceCondition",
                                  "reason",
                                  "packageKind",
                                  "quantityPerPackage",
                                  "minCount",
                                  "minimumQuantity",
                                  "customerUnitPrice",
                                  "discountedUnitPrice",
                                  "stockQuantity",
                                  "visibility",
                                  "purchasable"
                                ],
                                "additionalProperties": false
                              },
                              "description": "当前购买选项"
                            }
                          },
                          "required": [
                            "gId",
                            "name",
                            "brand",
                            "specification",
                            "imageUrl",
                            "detailUrl",
                            "priceUnit",
                            "reason",
                            "customerUnitPrice",
                            "visibility",
                            "delivery",
                            "purchaseOptions"
                          ],
                          "additionalProperties": false,
                          "description": "购物车商品"
                        },
                        "selections": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "optionId": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "description": "服务端购买标识，原样使用；null 不可提交"
                              },
                              "count": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "description": "整数份数，输出为十进制字符串"
                              },
                              "name": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "description": "名称"
                              }
                            },
                            "required": [
                              "optionId",
                              "count",
                              "name"
                            ],
                            "additionalProperties": false
                          },
                          "description": "当前选项及份数"
                        }
                      },
                      "required": [
                        "itemId",
                        "reason",
                        "editable",
                        "removable",
                        "product",
                        "selections"
                      ],
                      "additionalProperties": false
                    },
                    "description": "本次返回项或参与预览的完整集合"
                  },
                  "preview": {
                    "anyOf": [
                      {
                        "type": "object",
                        "properties": {
                          "items": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "gId": {
                                  "type": "integer",
                                  "minimum": 1,
                                  "maximum": 2147483647,
                                  "description": "搜索返回的商品 SKU，不使用散装内部 SKU"
                                },
                                "optionId": {
                                  "type": "string",
                                  "description": "服务端购买标识，原样使用；null 不可提交"
                                },
                                "count": {
                                  "type": "string",
                                  "pattern": "^-?\\d+(\\.\\d+)?$",
                                  "description": "十进制字符串；保持服务端精度，null 不是 0"
                                },
                                "quantity": {
                                  "type": "string",
                                  "pattern": "^-?\\d+(\\.\\d+)?$",
                                  "description": "十进制字符串；保持服务端精度，null 不是 0"
                                },
                                "customerUnitPrice": {
                                  "type": "string",
                                  "pattern": "^-?\\d+(\\.\\d+)?$",
                                  "description": "十进制字符串；保持服务端精度，null 不是 0"
                                },
                                "unitPrice": {
                                  "type": "string",
                                  "pattern": "^-?\\d+(\\.\\d+)?$",
                                  "description": "十进制字符串；保持服务端精度，null 不是 0"
                                },
                                "goodsAmount": {
                                  "type": "string",
                                  "pattern": "^-?\\d+(\\.\\d+)?$",
                                  "description": "十进制字符串；保持服务端精度，null 不是 0"
                                },
                                "discountAmount": {
                                  "type": "string",
                                  "pattern": "^-?\\d+(\\.\\d+)?$",
                                  "description": "十进制字符串；保持服务端精度，null 不是 0"
                                },
                                "unpackingFee": {
                                  "type": "string",
                                  "pattern": "^-?\\d+(\\.\\d+)?$",
                                  "description": "十进制字符串；保持服务端精度，null 不是 0"
                                },
                                "retailFee": {
                                  "type": "string",
                                  "pattern": "^-?\\d+(\\.\\d+)?$",
                                  "description": "十进制字符串；保持服务端精度，null 不是 0"
                                },
                                "total": {
                                  "type": "string",
                                  "pattern": "^-?\\d+(\\.\\d+)?$",
                                  "description": "十进制字符串；保持服务端精度，null 不是 0"
                                },
                                "baseUnit": {
                                  "type": [
                                    "string",
                                    "null"
                                  ],
                                  "description": "基本数量单位"
                                },
                                "unpackingFeeBasis": {
                                  "anyOf": [
                                    {
                                      "type": "string",
                                      "pattern": "^-?\\d+(\\.\\d+)?$",
                                      "description": "十进制字符串；保持服务端精度，null 不是 0"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ],
                                  "description": "十进制字符串；保持服务端精度，null 不是 0"
                                },
                                "unpackingFeeRatePercent": {
                                  "anyOf": [
                                    {
                                      "type": "string",
                                      "pattern": "^-?\\d+(\\.\\d+)?$",
                                      "description": "十进制字符串；保持服务端精度，null 不是 0"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ],
                                  "description": "十进制字符串；保持服务端精度，null 不是 0"
                                }
                              },
                              "required": [
                                "gId",
                                "optionId",
                                "count",
                                "quantity",
                                "customerUnitPrice",
                                "unitPrice",
                                "goodsAmount",
                                "discountAmount",
                                "unpackingFee",
                                "retailFee",
                                "total",
                                "baseUnit",
                                "unpackingFeeBasis",
                                "unpackingFeeRatePercent"
                              ],
                              "additionalProperties": false
                            },
                            "description": "本次返回项或参与预览的完整集合"
                          },
                          "goodsAmount": {
                            "type": "string",
                            "pattern": "^-?\\d+(\\.\\d+)?$",
                            "description": "十进制字符串；保持服务端精度，null 不是 0"
                          },
                          "discountAmount": {
                            "type": "string",
                            "pattern": "^-?\\d+(\\.\\d+)?$",
                            "description": "十进制字符串；保持服务端精度，null 不是 0"
                          },
                          "unpackingFee": {
                            "type": "string",
                            "pattern": "^-?\\d+(\\.\\d+)?$",
                            "description": "十进制字符串；保持服务端精度，null 不是 0"
                          },
                          "retailFee": {
                            "type": "string",
                            "pattern": "^-?\\d+(\\.\\d+)?$",
                            "description": "十进制字符串；保持服务端精度，null 不是 0"
                          },
                          "total": {
                            "type": "string",
                            "pattern": "^-?\\d+(\\.\\d+)?$",
                            "description": "十进制字符串；保持服务端精度，null 不是 0"
                          },
                          "promotions": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "activityId": {
                                  "type": [
                                    "string",
                                    "null"
                                  ],
                                  "description": "活动 ID，仅说明核对，不能提交指定活动"
                                },
                                "name": {
                                  "type": [
                                    "string",
                                    "null"
                                  ],
                                  "description": "名称"
                                },
                                "discountAmount": {
                                  "type": [
                                    "string",
                                    "null"
                                  ],
                                  "description": "优惠金额"
                                },
                                "goodsIds": {
                                  "type": "array",
                                  "items": {
                                    "type": "integer",
                                    "minimum": 1,
                                    "maximum": 2147483647,
                                    "description": "搜索返回的商品 SKU，不使用散装内部 SKU"
                                  },
                                  "description": "适用商品 ID"
                                }
                              },
                              "required": [
                                "activityId",
                                "name",
                                "discountAmount",
                                "goodsIds"
                              ],
                              "additionalProperties": false
                            },
                            "description": "商品可用活动或预览实际使用活动"
                          },
                          "restrictions": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "kind": {
                                  "type": [
                                    "string",
                                    "null"
                                  ],
                                  "description": "规则或活动类型"
                                },
                                "message": {
                                  "type": [
                                    "string",
                                    "null"
                                  ],
                                  "description": "业务结果或限制说明"
                                },
                                "requiredAmount": {
                                  "type": [
                                    "string",
                                    "null"
                                  ],
                                  "description": "要求达到的金额"
                                },
                                "currentAmount": {
                                  "type": [
                                    "string",
                                    "null"
                                  ],
                                  "description": "当前参与门槛的金额"
                                },
                                "goodsIds": {
                                  "type": "array",
                                  "items": {
                                    "type": "integer",
                                    "minimum": 1,
                                    "maximum": 2147483647,
                                    "description": "搜索返回的商品 SKU，不使用散装内部 SKU"
                                  },
                                  "description": "适用商品 ID"
                                }
                              },
                              "required": [
                                "kind",
                                "message",
                                "requiredAmount",
                                "currentAmount",
                                "goodsIds"
                              ],
                              "additionalProperties": false
                            },
                            "description": "适用分组门槛"
                          },
                          "calculatedAt": {
                            "type": "string",
                            "description": "完整计算完成的 UTC 时间"
                          },
                          "complete": {
                            "type": "boolean",
                            "const": true,
                            "description": "成功必须为 true，不返回近似或部分计算"
                          },
                          "explanation": {
                            "type": "string",
                            "description": "预览范围说明"
                          },
                          "excluded": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            },
                            "description": "未包含的费用项目"
                          }
                        },
                        "required": [
                          "items",
                          "goodsAmount",
                          "discountAmount",
                          "unpackingFee",
                          "retailFee",
                          "total",
                          "promotions",
                          "restrictions",
                          "calculatedAt",
                          "complete",
                          "explanation",
                          "excluded"
                        ],
                        "additionalProperties": false
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "description": "当前返回集合的完整费用预览；null 时看 previewError"
                  },
                  "previewError": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "description": "费用无法完整计算的原因"
                  },
                  "previewScope": {
                    "type": "string",
                    "const": "returnedItems",
                    "description": "固定 returnedItems，仅覆盖本次返回项"
                  },
                  "cartUrl": {
                    "type": "string",
                    "format": "uri",
                    "description": "客户人工结算的购物车入口"
                  }
                },
                "required": [
                  "items",
                  "preview",
                  "previewError",
                  "previewScope",
                  "cartUrl"
                ],
                "additionalProperties": false
              },
              {
                "type": "null"
              }
            ],
            "description": "写入后的购物车快照；null 不代表写入失败"
          },
          "cartReadError": {
            "type": [
              "string",
              "null"
            ],
            "description": "购物车刷新错误，不改变业务回执"
          },
          "guidance": {
            "type": "string",
            "description": "人工结算和重试指引"
          }
        },
        "required": [
          "receipt",
          "cart",
          "cartReadError",
          "guidance"
        ],
        "additionalProperties": false,
        "$schema": "http://json-schema.org/draft-07/schema#"
      },
      "title": "update_cart",
      "annotations": {
        "readOnlyHint": false,
        "destructiveHint": true,
        "idempotentHint": true,
        "openWorldHint": false
      }
    },
    {
      "name": "remove_from_cart",
      "description": "删除购物车 itemIds，关联 SPU 可能同时删除，锁定项保留。按 affected/retained 如实说明，不能把输入项数当删除数。 AI 可以帮助查询商品、预览费用、加入购物车、修改份数和删除购物车商品。如需下单，请客户自行打开商城购物车，核对商品、数量和费用，人工进行结算和支付。目前不支持 AI 下单或支付接口。 写入看 receipt.applied/receiptSaved；cartReadError 或 cart.previewError 不代表写入失败，禁止自动换 ID 重试。",
      "inputSchema": {
        "type": "object",
        "properties": {
          "requestId": {
            "type": "string",
            "pattern": "^[A-Za-z0-9_-]{8,100}$",
            "description": "同一业务意图及重试保持同一 ID，保留 366 天；不确定时先查询购物车，禁止自动换 ID 重试"
          },
          "itemIds": {
            "type": "array",
            "items": {
              "type": "string",
              "minLength": 1,
              "maxLength": 80,
              "description": "购物车返回的 itemId，原样使用，不解析或拼接"
            },
            "minItems": 1,
            "maxItems": 100,
            "description": "1–100 个购物车标识，重复项去重"
          },
          "accessToken": {
            "type": "string",
            "minLength": 1,
            "maxLength": 8192,
            "description": "仅账号密码直登 Token 的兼容参数。优先使用 Authorization: Bearer；OAuth Token 只能放请求头。不得传官网 Token"
          }
        },
        "required": [
          "requestId",
          "itemIds"
        ],
        "additionalProperties": false,
        "$schema": "http://json-schema.org/draft-07/schema#"
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "receipt": {
            "type": "object",
            "properties": {
              "applied": {
                "type": [
                  "boolean",
                  "null"
                ],
                "description": "true 已修改，false 未修改，null 执行中或未知"
              },
              "uncertain": {
                "type": "boolean",
                "description": "结果存在不确定性，应先查询核对，禁止换 ID 重试"
              },
              "receiptSaved": {
                "type": "boolean",
                "description": "回执是否确认保存"
              },
              "message": {
                "type": "string",
                "description": "业务结果或限制说明"
              },
              "affected": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "itemId": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "购物车不透明标识，原样使用"
                    },
                    "gId": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 2147483647,
                      "description": "商品 SKU ID"
                    },
                    "reason": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "不可用或受限原因；null 表示无补充原因"
                    }
                  },
                  "required": [
                    "itemId",
                    "gId",
                    "reason"
                  ],
                  "additionalProperties": false
                },
                "description": "实际受影响商品"
              },
              "retained": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "itemId": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "购物车不透明标识，原样使用"
                    },
                    "gId": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 2147483647,
                      "description": "商品 SKU ID"
                    },
                    "reason": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "不可用或受限原因；null 表示无补充原因"
                    }
                  },
                  "required": [
                    "itemId",
                    "gId",
                    "reason"
                  ],
                  "additionalProperties": false
                },
                "description": "保留项及原因"
              }
            },
            "required": [
              "applied",
              "uncertain",
              "receiptSaved",
              "message",
              "affected",
              "retained"
            ],
            "additionalProperties": false,
            "description": "业务写入回执，与刷新结果分开判断"
          },
          "cart": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "items": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "itemId": {
                          "type": "string",
                          "description": "购物车不透明标识，原样使用"
                        },
                        "reason": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "不可用或受限原因；null 表示无补充原因"
                        },
                        "editable": {
                          "type": "boolean",
                          "description": "是否可改量"
                        },
                        "removable": {
                          "type": "boolean",
                          "description": "是否可删除"
                        },
                        "product": {
                          "type": "object",
                          "properties": {
                            "gId": {
                              "type": "integer",
                              "minimum": 1,
                              "maximum": 2147483647,
                              "description": "搜索返回的商品 SKU，不使用散装内部 SKU"
                            },
                            "name": {
                              "type": [
                                "string",
                                "null"
                              ],
                              "description": "名称"
                            },
                            "brand": {
                              "type": [
                                "string",
                                "null"
                              ],
                              "description": "商品品牌"
                            },
                            "specification": {
                              "type": [
                                "string",
                                "null"
                              ],
                              "description": "规格"
                            },
                            "imageUrl": {
                              "type": [
                                "string",
                                "null"
                              ],
                              "description": "商品图片地址"
                            },
                            "detailUrl": {
                              "type": [
                                "string",
                                "null"
                              ],
                              "description": "商城人工查看入口"
                            },
                            "priceUnit": {
                              "type": [
                                "string",
                                "null"
                              ],
                              "description": "基本计价单位"
                            },
                            "reason": {
                              "type": [
                                "string",
                                "null"
                              ],
                              "description": "不可用或受限原因；null 表示无补充原因"
                            },
                            "customerUnitPrice": {
                              "anyOf": [
                                {
                                  "type": "string",
                                  "pattern": "^-?\\d+(\\.\\d+)?$",
                                  "description": "十进制字符串；保持服务端精度，null 不是 0"
                                },
                                {
                                  "type": "null"
                                }
                              ],
                              "description": "十进制字符串；保持服务端精度，null 不是 0"
                            },
                            "visibility": {
                              "type": "string",
                              "enum": [
                                "visible",
                                "loginRequired",
                                "unavailable"
                              ],
                              "description": "visible 可见；loginRequired 需登录；unavailable 无法确认"
                            },
                            "attributes": {
                              "type": "object",
                              "additionalProperties": {
                                "type": "string"
                              },
                              "description": "中文商品属性名及值"
                            },
                            "delivery": {
                              "anyOf": [
                                {
                                  "type": "object",
                                  "properties": {
                                    "status": {
                                      "type": [
                                        "string",
                                        "null"
                                      ],
                                      "description": "配置状态"
                                    },
                                    "basis": {
                                      "type": [
                                        "string",
                                        "null"
                                      ],
                                      "description": "适用或计算依据"
                                    },
                                    "description": {
                                      "type": [
                                        "string",
                                        "null"
                                      ],
                                      "description": "说明"
                                    },
                                    "cloudNotice": {
                                      "type": [
                                        "string",
                                        "null"
                                      ],
                                      "description": "云仓配送时间不固定的说明"
                                    }
                                  },
                                  "required": [
                                    "status",
                                    "basis",
                                    "description"
                                  ],
                                  "additionalProperties": false
                                },
                                {
                                  "type": "null"
                                }
                              ],
                              "description": "配送配置说明，库存不是到货承诺"
                            },
                            "purchaseOptions": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "optionId": {
                                    "type": [
                                      "string",
                                      "null"
                                    ],
                                    "description": "服务端购买标识，原样使用；null 不可提交"
                                  },
                                  "name": {
                                    "type": [
                                      "string",
                                      "null"
                                    ],
                                    "description": "名称"
                                  },
                                  "fulfillment": {
                                    "type": [
                                      "string",
                                      "null"
                                    ],
                                    "description": "自营、联营、零售或云仓"
                                  },
                                  "unit": {
                                    "type": [
                                      "string",
                                      "null"
                                    ],
                                    "description": "份数单位"
                                  },
                                  "baseUnit": {
                                    "type": [
                                      "string",
                                      "null"
                                    ],
                                    "description": "基本数量单位"
                                  },
                                  "priceCondition": {
                                    "type": [
                                      "string",
                                      "null"
                                    ],
                                    "description": "折扣价适用说明"
                                  },
                                  "reason": {
                                    "type": [
                                      "string",
                                      "null"
                                    ],
                                    "description": "不可用或受限原因；null 表示无补充原因"
                                  },
                                  "packageKind": {
                                    "type": "string",
                                    "enum": [
                                      "big",
                                      "small",
                                      "scattered"
                                    ],
                                    "description": "big 整箱；small 小包；scattered 散装"
                                  },
                                  "quantityPerPackage": {
                                    "type": "string",
                                    "pattern": "^-?\\d+(\\.\\d+)?$",
                                    "description": "十进制字符串；保持服务端精度，null 不是 0"
                                  },
                                  "minCount": {
                                    "type": "string",
                                    "pattern": "^-?\\d+(\\.\\d+)?$",
                                    "description": "十进制字符串；保持服务端精度，null 不是 0"
                                  },
                                  "minimumQuantity": {
                                    "type": "string",
                                    "pattern": "^-?\\d+(\\.\\d+)?$",
                                    "description": "十进制字符串；保持服务端精度，null 不是 0"
                                  },
                                  "customerUnitPrice": {
                                    "anyOf": [
                                      {
                                        "type": "string",
                                        "pattern": "^-?\\d+(\\.\\d+)?$",
                                        "description": "十进制字符串；保持服务端精度，null 不是 0"
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ],
                                    "description": "十进制字符串；保持服务端精度，null 不是 0"
                                  },
                                  "discountedUnitPrice": {
                                    "anyOf": [
                                      {
                                        "type": "string",
                                        "pattern": "^-?\\d+(\\.\\d+)?$",
                                        "description": "十进制字符串；保持服务端精度，null 不是 0"
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ],
                                    "description": "十进制字符串；保持服务端精度，null 不是 0"
                                  },
                                  "stockQuantity": {
                                    "anyOf": [
                                      {
                                        "type": "string",
                                        "pattern": "^-?\\d+(\\.\\d+)?$",
                                        "description": "十进制字符串；保持服务端精度，null 不是 0"
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ],
                                    "description": "十进制字符串；保持服务端精度，null 不是 0"
                                  },
                                  "visibility": {
                                    "type": "string",
                                    "enum": [
                                      "visible",
                                      "loginRequired",
                                      "unavailable"
                                    ],
                                    "description": "visible 可见；loginRequired 需登录；unavailable 无法确认"
                                  },
                                  "purchasable": {
                                    "type": "boolean",
                                    "description": "当前是否可购买"
                                  },
                                  "fees": {
                                    "type": "array",
                                    "items": {
                                      "type": "object",
                                      "properties": {
                                        "kind": {
                                          "type": [
                                            "string",
                                            "null"
                                          ],
                                          "description": "规则或活动类型"
                                        },
                                        "name": {
                                          "type": [
                                            "string",
                                            "null"
                                          ],
                                          "description": "名称"
                                        },
                                        "status": {
                                          "type": [
                                            "string",
                                            "null"
                                          ],
                                          "description": "配置状态"
                                        },
                                        "basis": {
                                          "type": [
                                            "string",
                                            "null"
                                          ],
                                          "description": "适用或计算依据"
                                        },
                                        "ratePercent": {
                                          "type": [
                                            "string",
                                            "null"
                                          ],
                                          "description": "百分数费率"
                                        },
                                        "amount": {
                                          "type": [
                                            "string",
                                            "null"
                                          ],
                                          "description": "人民币金额，十进制字符串；null 为未知或不适用"
                                        },
                                        "description": {
                                          "type": [
                                            "string",
                                            "null"
                                          ],
                                          "description": "说明"
                                        }
                                      },
                                      "required": [
                                        "kind",
                                        "name",
                                        "status",
                                        "basis",
                                        "ratePercent",
                                        "amount",
                                        "description"
                                      ],
                                      "additionalProperties": false
                                    },
                                    "description": "费用规则"
                                  }
                                },
                                "required": [
                                  "optionId",
                                  "name",
                                  "fulfillment",
                                  "unit",
                                  "baseUnit",
                                  "priceCondition",
                                  "reason",
                                  "packageKind",
                                  "quantityPerPackage",
                                  "minCount",
                                  "minimumQuantity",
                                  "customerUnitPrice",
                                  "discountedUnitPrice",
                                  "stockQuantity",
                                  "visibility",
                                  "purchasable"
                                ],
                                "additionalProperties": false
                              },
                              "description": "当前购买选项"
                            }
                          },
                          "required": [
                            "gId",
                            "name",
                            "brand",
                            "specification",
                            "imageUrl",
                            "detailUrl",
                            "priceUnit",
                            "reason",
                            "customerUnitPrice",
                            "visibility",
                            "delivery",
                            "purchaseOptions"
                          ],
                          "additionalProperties": false,
                          "description": "购物车商品"
                        },
                        "selections": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "optionId": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "description": "服务端购买标识，原样使用；null 不可提交"
                              },
                              "count": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "description": "整数份数，输出为十进制字符串"
                              },
                              "name": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "description": "名称"
                              }
                            },
                            "required": [
                              "optionId",
                              "count",
                              "name"
                            ],
                            "additionalProperties": false
                          },
                          "description": "当前选项及份数"
                        }
                      },
                      "required": [
                        "itemId",
                        "reason",
                        "editable",
                        "removable",
                        "product",
                        "selections"
                      ],
                      "additionalProperties": false
                    },
                    "description": "本次返回项或参与预览的完整集合"
                  },
                  "preview": {
                    "anyOf": [
                      {
                        "type": "object",
                        "properties": {
                          "items": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "gId": {
                                  "type": "integer",
                                  "minimum": 1,
                                  "maximum": 2147483647,
                                  "description": "搜索返回的商品 SKU，不使用散装内部 SKU"
                                },
                                "optionId": {
                                  "type": "string",
                                  "description": "服务端购买标识，原样使用；null 不可提交"
                                },
                                "count": {
                                  "type": "string",
                                  "pattern": "^-?\\d+(\\.\\d+)?$",
                                  "description": "十进制字符串；保持服务端精度，null 不是 0"
                                },
                                "quantity": {
                                  "type": "string",
                                  "pattern": "^-?\\d+(\\.\\d+)?$",
                                  "description": "十进制字符串；保持服务端精度，null 不是 0"
                                },
                                "customerUnitPrice": {
                                  "type": "string",
                                  "pattern": "^-?\\d+(\\.\\d+)?$",
                                  "description": "十进制字符串；保持服务端精度，null 不是 0"
                                },
                                "unitPrice": {
                                  "type": "string",
                                  "pattern": "^-?\\d+(\\.\\d+)?$",
                                  "description": "十进制字符串；保持服务端精度，null 不是 0"
                                },
                                "goodsAmount": {
                                  "type": "string",
                                  "pattern": "^-?\\d+(\\.\\d+)?$",
                                  "description": "十进制字符串；保持服务端精度，null 不是 0"
                                },
                                "discountAmount": {
                                  "type": "string",
                                  "pattern": "^-?\\d+(\\.\\d+)?$",
                                  "description": "十进制字符串；保持服务端精度，null 不是 0"
                                },
                                "unpackingFee": {
                                  "type": "string",
                                  "pattern": "^-?\\d+(\\.\\d+)?$",
                                  "description": "十进制字符串；保持服务端精度，null 不是 0"
                                },
                                "retailFee": {
                                  "type": "string",
                                  "pattern": "^-?\\d+(\\.\\d+)?$",
                                  "description": "十进制字符串；保持服务端精度，null 不是 0"
                                },
                                "total": {
                                  "type": "string",
                                  "pattern": "^-?\\d+(\\.\\d+)?$",
                                  "description": "十进制字符串；保持服务端精度，null 不是 0"
                                },
                                "baseUnit": {
                                  "type": [
                                    "string",
                                    "null"
                                  ],
                                  "description": "基本数量单位"
                                },
                                "unpackingFeeBasis": {
                                  "anyOf": [
                                    {
                                      "type": "string",
                                      "pattern": "^-?\\d+(\\.\\d+)?$",
                                      "description": "十进制字符串；保持服务端精度，null 不是 0"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ],
                                  "description": "十进制字符串；保持服务端精度，null 不是 0"
                                },
                                "unpackingFeeRatePercent": {
                                  "anyOf": [
                                    {
                                      "type": "string",
                                      "pattern": "^-?\\d+(\\.\\d+)?$",
                                      "description": "十进制字符串；保持服务端精度，null 不是 0"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ],
                                  "description": "十进制字符串；保持服务端精度，null 不是 0"
                                }
                              },
                              "required": [
                                "gId",
                                "optionId",
                                "count",
                                "quantity",
                                "customerUnitPrice",
                                "unitPrice",
                                "goodsAmount",
                                "discountAmount",
                                "unpackingFee",
                                "retailFee",
                                "total",
                                "baseUnit",
                                "unpackingFeeBasis",
                                "unpackingFeeRatePercent"
                              ],
                              "additionalProperties": false
                            },
                            "description": "本次返回项或参与预览的完整集合"
                          },
                          "goodsAmount": {
                            "type": "string",
                            "pattern": "^-?\\d+(\\.\\d+)?$",
                            "description": "十进制字符串；保持服务端精度，null 不是 0"
                          },
                          "discountAmount": {
                            "type": "string",
                            "pattern": "^-?\\d+(\\.\\d+)?$",
                            "description": "十进制字符串；保持服务端精度，null 不是 0"
                          },
                          "unpackingFee": {
                            "type": "string",
                            "pattern": "^-?\\d+(\\.\\d+)?$",
                            "description": "十进制字符串；保持服务端精度，null 不是 0"
                          },
                          "retailFee": {
                            "type": "string",
                            "pattern": "^-?\\d+(\\.\\d+)?$",
                            "description": "十进制字符串；保持服务端精度，null 不是 0"
                          },
                          "total": {
                            "type": "string",
                            "pattern": "^-?\\d+(\\.\\d+)?$",
                            "description": "十进制字符串；保持服务端精度，null 不是 0"
                          },
                          "promotions": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "activityId": {
                                  "type": [
                                    "string",
                                    "null"
                                  ],
                                  "description": "活动 ID，仅说明核对，不能提交指定活动"
                                },
                                "name": {
                                  "type": [
                                    "string",
                                    "null"
                                  ],
                                  "description": "名称"
                                },
                                "discountAmount": {
                                  "type": [
                                    "string",
                                    "null"
                                  ],
                                  "description": "优惠金额"
                                },
                                "goodsIds": {
                                  "type": "array",
                                  "items": {
                                    "type": "integer",
                                    "minimum": 1,
                                    "maximum": 2147483647,
                                    "description": "搜索返回的商品 SKU，不使用散装内部 SKU"
                                  },
                                  "description": "适用商品 ID"
                                }
                              },
                              "required": [
                                "activityId",
                                "name",
                                "discountAmount",
                                "goodsIds"
                              ],
                              "additionalProperties": false
                            },
                            "description": "商品可用活动或预览实际使用活动"
                          },
                          "restrictions": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "kind": {
                                  "type": [
                                    "string",
                                    "null"
                                  ],
                                  "description": "规则或活动类型"
                                },
                                "message": {
                                  "type": [
                                    "string",
                                    "null"
                                  ],
                                  "description": "业务结果或限制说明"
                                },
                                "requiredAmount": {
                                  "type": [
                                    "string",
                                    "null"
                                  ],
                                  "description": "要求达到的金额"
                                },
                                "currentAmount": {
                                  "type": [
                                    "string",
                                    "null"
                                  ],
                                  "description": "当前参与门槛的金额"
                                },
                                "goodsIds": {
                                  "type": "array",
                                  "items": {
                                    "type": "integer",
                                    "minimum": 1,
                                    "maximum": 2147483647,
                                    "description": "搜索返回的商品 SKU，不使用散装内部 SKU"
                                  },
                                  "description": "适用商品 ID"
                                }
                              },
                              "required": [
                                "kind",
                                "message",
                                "requiredAmount",
                                "currentAmount",
                                "goodsIds"
                              ],
                              "additionalProperties": false
                            },
                            "description": "适用分组门槛"
                          },
                          "calculatedAt": {
                            "type": "string",
                            "description": "完整计算完成的 UTC 时间"
                          },
                          "complete": {
                            "type": "boolean",
                            "const": true,
                            "description": "成功必须为 true，不返回近似或部分计算"
                          },
                          "explanation": {
                            "type": "string",
                            "description": "预览范围说明"
                          },
                          "excluded": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            },
                            "description": "未包含的费用项目"
                          }
                        },
                        "required": [
                          "items",
                          "goodsAmount",
                          "discountAmount",
                          "unpackingFee",
                          "retailFee",
                          "total",
                          "promotions",
                          "restrictions",
                          "calculatedAt",
                          "complete",
                          "explanation",
                          "excluded"
                        ],
                        "additionalProperties": false
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "description": "当前返回集合的完整费用预览；null 时看 previewError"
                  },
                  "previewError": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "description": "费用无法完整计算的原因"
                  },
                  "previewScope": {
                    "type": "string",
                    "const": "returnedItems",
                    "description": "固定 returnedItems，仅覆盖本次返回项"
                  },
                  "cartUrl": {
                    "type": "string",
                    "format": "uri",
                    "description": "客户人工结算的购物车入口"
                  }
                },
                "required": [
                  "items",
                  "preview",
                  "previewError",
                  "previewScope",
                  "cartUrl"
                ],
                "additionalProperties": false
              },
              {
                "type": "null"
              }
            ],
            "description": "写入后的购物车快照；null 不代表写入失败"
          },
          "cartReadError": {
            "type": [
              "string",
              "null"
            ],
            "description": "购物车刷新错误，不改变业务回执"
          },
          "guidance": {
            "type": "string",
            "description": "人工结算和重试指引"
          }
        },
        "required": [
          "receipt",
          "cart",
          "cartReadError",
          "guidance"
        ],
        "additionalProperties": false,
        "$schema": "http://json-schema.org/draft-07/schema#"
      },
      "title": "remove_from_cart",
      "annotations": {
        "readOnlyHint": false,
        "destructiveHint": true,
        "idempotentHint": true,
        "openWorldHint": false
      }
    }
  ]
}
