Skip to main content
Glama

チェックアウト見積もり(x402 1回目)

quote_checkout

カートの内容で x402 チェックアウトの 1 回目を実行する。在庫を仮押さえし(有効期限は返り値 expires_at_unix_ms)、小計・割引・送料・合計(JPYC)と reservation_id、および PAYMENT-REQUIRED チャレンジ(base64url、x402 accepts 配列)を返す。accepts の決済方式: 『eip3009』(既定。通常購入の EOA ウォレットはこちらを選び、EIP-712 TransferWithAuthorization に署名する) と『erc20-transfer』(ecrecover 非対応のスマートコントラクトウォレット専用。payer_address を渡した予約にだけ提示される。extra.payerAuthorization.message を personal_sign して authorize_transfer を呼び、その成功後に表示額ぴったりの通常 ERC-20 transfer を実行し、txHash 任意/payerAddress 必須で submit_payment に渡す)。0円デモは demo_signature_version=1 と payer_address を渡すと demo-signature を提示する。送金せず personal_sign だけで完了する。全 item は同一ショップである必要がある。配送が必要な商品があれば shipping を、贈答なら gift_recipient を必ず渡すこと。

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
itemsYes購入する商品
is_giftNo贈答かどうか
shop_idYesショップ ID(全 item 共通)
shippingNo配送先(配送が必要な商品がある場合は必須)
coupon_codeNoショップから受け取ったクーポンコード(任意。NFT割引との併用不可)
customer_noteNo注文メモ
payer_addressNo支払いに使うウォレットアドレス(任意・推奨)。指定すると settle 時に支払い元と照合され、別ウォレットからの支払いは拒否される。スマートコントラクトウォレットで erc20-transfer 方式を使う場合は必須(指定が無いと accepts に erc20-transfer が提示されない)
customer_emailYes注文確認メールの送信先(必須)
gift_recipientNo贈り先(is_gift が true なら必須)
idempotency_keyNo同じ見積もりの再試行で必ず再利用する一意キー。クーポン利用時は必須(UUID推奨)。異なる購入内容に同じキーを使わないこと
preferred_chain_idNo希望チェーン(任意。商品の対応チェーンから選ばれる)
demo_signature_versionNo0円デモのpersonal_signに対応する場合のみ指定

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedInput schema / properties / demo_signature_version
      Added value: +{
      +  "const": "1",
      +  "description": "0円デモのpersonal_signに対応する場合のみ指定",
      +  "type": "string"
      +}
  2. Changed2 schema fields changed
    • addedInput schema / properties / coupon_code
      Added value: +{
      +  "description": "ショップから受け取ったクーポンコード(任意。NFT割引との併用不可)",
      +  "maxLength": 64,
      +  "minLength": 1,
      +  "pattern": "^[A-Za-z0-9][A-Za-z0-9_-]*$",
      +  "type": "string"
      +}
    • addedInput schema / properties / idempotency_key
      Added value: +{
      +  "description": "同じ見積もりの再試行で必ず再利用する一意キー。クーポン利用時は必須(UUID推奨)。異なる購入内容に同じキーを使わないこと",
      +  "maxLength": 64,
      +  "minLength": 16,
      +  "pattern": "^[A-Za-z0-9_-]+$",
      +  "type": "string"
      +}
  3. Changed1 schema field changed
    • addedInput schema / properties / payer_address
      Added value: +{
      +  "description": "支払いに使うウォレットアドレス(任意・推奨)。指定すると settle 時に支払い元と照合され、別ウォレットからの支払いは拒否される。スマートコントラクトウォレットで erc20-transfer 方式を使う場合は必須(指定が無いと accepts に erc20-transfer が提示されない)",
      +  "pattern": "^0x[0-9a-fA-F]{40}$",
      +  "type": "string"
      +}
  4. First observed

TDQS

A4.5/5.0
Behavior5/5

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

With no annotations provided, the description carries the full disclosure burden and delivers: inventory is provisionally held with an expiry (expires_at_unix_ms), the PA YMENT-REQUIRED challenge format is described, and both payment paths are fully specified including the subtle rule that erc20-transfer appears in accepts only when payer_address was passed. It even discloses the demo mode completes with personal_sign only and 送金せず, an important side-effect-free caveat.

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 core purpose is front-loaded and every sentence earns its place, including the long erc20-transfer walkthrough, which is genuinely needed for correct invocation. However, the entire definition is one dense paragraph with no section breaks, so the payment-flow extension is harder to scan than a structured layout with separate sentences per concern would be.

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?

Given the high complexity (12 params, nested objects, no annotations, no output schema), the description covers return values, the inventory-hold side effect, both payment methods, the demo mode, and the same-shop constraint - remarkably complete. It could go further by explicitly handing the eip3009 path to submit_payment (only the erc20 path gets that explicit hand-off) and by noting error conditions.

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; the description adds value by explaining cross-parameter behavior the schema cannot express: erc20-transfer is presented only when payer_address is supplied, the demo requires both demo_signature_version=1 and payer_address, and shipping/gift_recicipient become mandatory based on item characteristics. This ties individual parameters into the flow logic rather than restating their types.

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?

States a specific verb and resource - 『カートの内容で x402 チェックアウトの 1 回目を実行する』 - and the title confirms it is the first checkout step, distinguishing it from sibling submit_payment. It then enumerates the return contract (在庫仮押さえ、expires_at_unix_ms、小計・割引・送料・合計、reservation_id、PAYMENT-REQUIRED チャレンジ), leaving no doubt about what the tool does.

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?

Provides concrete conditional guidance: pass shipping when 配送が必要な商品がある, pass giftt_recipient when 贈答, pass payer_address to unlock erc20-transfer, and pass demo_signature_version=1 + payer_address for the 0円 demo. It also names submit_payment as the follow-up for the erc20-transfer path ('submit_payment に渡す'). It does not explicitly contrast siblings like get_order_status or state when NOT to use this tool, so it stops short of full routing guidance.

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