Skip to main content
Glama

跨 Agent 结算转账

settlement.transfer
Read-only

在任意两个跨 Agent 结算账户之间转账 credits(双边结算)。原子扣减付款方余额并增加收款方余额,写入不可篡改哈希链流水。幂等键(idempotency_key)保证重试不会重复结算。适用于多 Agent 协作后的任务结算 / 分账:Agent A 完成子任务后,由调度方调用本工具向 A 结算 credits,形成可审计的债权债务账本。参数:from_account 付款方、to_account 收款方、amount 金额(正数)、reason 原因(可选)、unit 单位(默认 credits)、idempotency_key 幂等键(强烈建议)。返回 tx_id、双方最新余额、digest(哈希链凭证)。Example: {"from_account":"orchestrator","to_account":"agent-a","amount":5,"reason":"task.complete","idempotency_key":"settle-001"}

Input Schema

NameRequiredDescriptionDefault
unitNo结算单位,默认 credits(可选)
amountYes结算金额(credits,正数,最多 6 位小数)
reasonNo结算原因,如 task.complete、tool.cost、resource.read(可选)
to_accountYes收款方账户(被结算的 Agent/组织)
from_accountYes付款方账户(发起结算的 Agent/组织)
idempotency_keyNo幂等键:重复提交同一键不会重复结算,直接返回原交易(强烈建议,用于网络重试安全)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

B3.3/5.0
Behavior1/5

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

The description says the tool atomically debits the payer and credits the receiver, and writes an immutable hash-chain ledger entry — a clear write/mutation. Annotations declare readOnlyHint=true, directly contradicting the described behavior. This is a serious inconsistency that could mislead an agent into treating a balance-mutating call as safe/read-only.

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?

Well front-loaded: core transfer semantics first, then use cases, params, and returns, ending with a concrete example. Some redundancy with the already-complete schema in the parameter enumeration, but it is organized and each section is usable.

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?

With no output schema, the description usefully discloses return values (tx_id, both updated balances, digest) and provides an example call. Missing only error/failure semantics (insufficient balance, invalid account), which matter for a settlement tool, but overall it is complete enough to invoke correctly.

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 100%, so all six parameters are already documented in the schema. The description's parameter list (from_account, to_account, amount positive, reason optional, unit default credits, idempotency_key strongly recommended) largely restates the schema rather than adding syntax or format details, so the baseline 3 applies.

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 description states a specific verb and resource: transfer credits between two cross-Agent settlement accounts with atomic bilateral settlement and hash-chain ledger writing. This is clearly distinguishable from settlement.account/ledger by behavior, though those sibling names are never explicitly referenced to route the agent.

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

Usage Guidelines4/5

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

Gives a concrete usage scenario — an orchestrator settling credits to Agent A after task completion / revenue split — so the agent knows the context to invoke it. It does not state when NOT to use it (e.g., read-only queries should go to settlement.ledger) or name alternatives.

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.