Skip to main content
Glama

決済の確定(x402 2回目)

submit_payment

quote_checkout で得た reservation_id と、エージェントが用意した x402 PaymentPayload(base64url)を渡して決済を確定する。demo-signatureならextra.payerAuthorization.messageをpersonal_signし、{payerAddress,demoSignature}を渡す。送金やauthorize_transferは呼ばない。quote_checkout の accepts から選んだ方式に応じて payload の中身が変わる: 『eip3009』なら { signature, authorization } (EIP-712 TransferWithAuthorization の署名)、『erc20-transfer』なら { payerAddress, txHash? } (ウォレットが実行した通常の ERC-20 transferの送金元アドレス。txHash は分かれば渡す任意ヒント — 無くてもサーバがon-chain のログを検索して照合する)。erc20-transfer は送金前に必ず authorize_transfer を成功させる。eip3009 はサーバが facilitator 経由で on-chain settle し、erc20-transfer はユーザーが既に送金したものをサーバが検証するだけ。いずれも確定した注文(order_number / tx_hash)を返す。

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
reservation_idYesquote_checkout が返した reservation_id
payment_signatureYes署名済み x402 PaymentPayload(base64url JSON)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.4/5.0
Behavior4/5

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

With no annotations, the description carries the full burden, and it delivers: it explains the demo-signature path, the server's facilitator-based on-chain settlement for eip3009, the server's verification-only role for erc20-transfer, and the confirmed order fields returned. The only blemish is the ambiguous authorize_transfer instruction, but the behavioral model is otherwise explicit and useful.

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?

The text is dense and organized by method; the core invocation appears in the first sentence and each later sentence adds a distinct piece of information. It is longer than minimal, but the length is mostly functional given the method-specific complexity.

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?

The description covers inputs, method-dependent payload construction, prerequisites, and return fields despite no output schema. Minor gaps are that 'demo-signature' and 'extra.payerAuthorization' are name-dropped without full definition, and failure cases are not addressed, but these are marginal for an agent that already has quote_checkout context.

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

Parameters5/5

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

Even though schema coverage is 100%, the description adds critical structure for payment_signature by method: { signature, authorization } for eip3009, { payerAddress, txHash? } for erc20-transfer, and { payerAddress, demoSignature } for demo-signature. It also clarifies that txHash is optional, which is exactly the meaning an agent needs beyond the schema's generic 'base64url JSON' label.

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 names a precise action — confirm settlement with a reservation_id and x402 PaymentPayload — and positions it as the second step after quote_checkout. It also distinguishes itself from transfer/authorize_transfer and details the two payment methods, so an agent can tell it apart from siblings.

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?

It gives clear flow context (after quote_checkout, with a prepared PaymentPayload) and method-specific requirements for eip3009 vs erc20-transfer, and it explicitly names alternatives. However, the instruction '送金やauthorize_transferは呼ばない' conflicts with the later requirement to succeed at authorize_transfer before an erc20-transfer, leaving some ambiguity about when to call the sibling 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