Skip to main content
Glama

奇妙生产力 · Qimiao Productivity

pay_with_balance

DestructiveIdempotent

已绑定账号可直接余额付款,无须打开网页。先展示本单任务、金额及交付约定;用户在对话里明确说确认后,传user_confirmation={confirmed:true,amount_cents:本单分值,currency:"CNY"}即可直接扣款,不再要求原生表单或网页二次确认。若用户已明确确认当前这张冻结报价,可直接传确认;不得编造确认或沿用其他订单的同意。尚未确认时省略user_confirmation,旧客户端返回本单摘要及短时confirmation_token,让Agent在对话里询问,获得同意后带原参数和token重试。支持原生确认的客户端也可使用原生确认。金额变化须重新询问。成功或不确定时查原单,重试不重复扣款;网页支付仅为用户可选方式。

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": {
      "service_id": "<service_id>",
      "credential": "<credential>",
      "connection_id": "<connection_id>",
      "connection_credential": "<connection_credential>",
      "contract_id": "<contract_id>",
      "request_key": "<request_key>"
    },
    "name": "pay_with_balance"
  }
}

Input Schema

NameRequiredDescriptionDefault
credentialYes
service_idYes
contract_idYes
request_keyYes
connection_idYes
user_confirmationNo
confirmation_tokenNo
connection_credentialYes

Output Schema

NameRequiredDescriptionDefault
recoveryYes
next_stepYes
schema_versionYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • removedInput schema / properties / user_confirmation / properties / amount_cents / exclusiveMinimum
      Removed value: -0
    • addedInput schema / properties / user_confirmation / properties / amount_cents / minimum
      Added value: +0
  2. Changed2 schema fields changed
    • addedInput schema / properties / confirmation_token
      Added value: +{
      +  "maxLength": 4096,
      +  "minLength": 32,
      +  "type": "string"
      +}
    • addedInput schema / properties / user_confirmation
      Added value: +{
      +  "additionalProperties": false,
      +  "properties": {
      +    "amount_cents": {
      +      "exclusiveMinimum": 0,
      +      "maximum": 9007199254740991,
      +      "type": "integer"
      +    },
      +    "confirmed": {
      +      "const": true,
      +      "type": "boolean"
      +    },
      +    "currency": {
      +      "const": "CNY",
      +      "type": "string"
      +    }
      +  },
      +  "required": [
      +    "confirmed",
      +    "amount_cents",
      +    "currency"
      +  ],
      +  "type": "object"
      +}
  3. First observed

TDQS

A4.3/5.0
Behavior5/5

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

Annotations already flag this as destructive/idempotent/openWorld; the description adds substantial context beyond them: money is actually deducted, retries do not double-charge, amount changes force a fresh confirmation, and success or uncertainty requires querying the original order. This is exactly the kind of behavioral detail 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 and contrast to web payment; every sentence carries a distinct rule (confirmation, token retry, amount change, idempotency). It is dense as a single block with no paragraph breaks or list structure, which slightly hurts scannability, but there is little waste.

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

Completeness4/5

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

An output schema exists, so return values need not be described, and annotations carry the safety profile. The complex confirmation state machine is well covered; the only real gap is documentation of the credential/ID parameters, which is significant but not blocking for the confirmation logic an agent must get right.

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

Parameters3/5

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

Schema description coverage is 0% across 8 params. The description richly explains user_confirmation's shape, confirmation_token's lifecycle, and implies request_key's idempotent role, but leaves service_id, credential, connection_id, connection_credential, and contract_id entirely undocumented in both schema and prose. Partial compensation justifies a 3.

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

Purpose4/5

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

The opening line states a specific verb and resource: pay an order directly from account balance, explicitly contrasted with open-web payment. It is highly specific about the mechanic, though it does not name sibling tools (quote_order, create_order) it depends on, so an agent must infer the ordering from context.

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?

Explicitly lays out the precondition (user must say 'confirm' in conversation), the when-not (do not fabricate confirmation or reuse consent from another order), the alternative path (native confirmation or web payment), and the fallback flow (omit user_confirmation, receive confirmation_token, retry). This is a complete when/when-not/alternatives map.

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