Skip to main content
Glama

面灵AI 面试助手

create_payment_order

Destructive

为某个商品下单并生成付款链接,由用户本人完成付款。wxpay 返回 weixin:// 开头的微信支付链接,需生成二维码供用户用微信扫一扫(直接点开无效);alipay 返回一个网页地址,用户在电脑浏览器打开后用支付宝扫页面上的二维码;alipay_wap 返回手机浏览器打开即跳转支付宝 App 的地址。付款后用 check_order_status 确认到账。商品 ID 取自 list_plans;优惠码与升级券折扣自动计入,可先用 preview_coupon / get_upgrade_offer 预览。会消耗用户的时长、次数或产生付款,执行前向用户说明扣费内容并取得同意。(需要用户授权,范围 account:write)

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "productId": "<productId>",
      "channel": "<channel>"
    },
    "name": "create_payment_order"
  }
}

Input Schema

NameRequiredDescriptionDefault
channelYeswxpay = 微信扫码;alipay = 电脑浏览器打开、支付宝扫码;alipay_wap = 手机浏览器打开、跳转支付宝
productIdYeslist_plans 中的商品 ID
couponCodeNo优惠码(仅新用户首单可用)
deferActivationNo仅会员卡可用:true = 付款后先存为未激活卡,由用户在面试前自行激活(activate_subscription_card)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.8/5.0
Behavior5/5

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

Annotations only flag destructive/not-read-only/closed-world; the description adds substantial behavior: it consumes the user's time quota, usage counts, or real money, requires explicit user consent first, and requires the account:write auth scope. It further discloses what each channel actually returns (weixin:// URI needing a generated QR code, a desktop web URL, a mobile redirect URL) and warns that opening the weixin:// link directly does not work — details the annotations cannot convey.

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

Conciseness4/5

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

Front-loaded with the core action, then channel behavior, then workflow routing, then the consent/auth constraint — a sensible ordering with no filler sentences. It is long, and the three channel descriptions partially restate the channel enum's own schema text, which is the main redundancy.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

There is no output schema, and the description compensates by describing the return value per channel and the mandatory follow-up (check_order_status for confirmation). For a billable mutation with an auth requirement, consent rule, and external payment flows, nothing an agent needs in order to call it correctly is missing.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so the baseline is 3, but the description adds meaning beyond the schema: it ties productId to list_plans and notes that coupon and upgrade discounts are applied automatically rather than needing separate invocation. The per-channel return semantics reinforce the channel enum. It does not add anything for deferActivation beyond what the schema already explains.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description opens with a specific verb+resource ('为某个商品下单并生成付款链接') and immediately scopes the actor ('由用户本人完成付款'), which distinguishes it from a payment-execution tool. It also names the data source for the key input (productId 取自 list_plans), so an agent knows exactly what this tool does versus siblings like list_plans or check_order_status.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It gives explicit routing: preview discounts with preview_coupon / get_upgrade_offer first, confirm payment afterwards with check_order_status, and obtain productId from list_plans. It also states a hard precondition ('执行前向用户说明扣费内容并取得同意'), which is exactly the kind of when-to-use/when-not guidance an agent needs before calling a billable tool.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources