Skip to main content
Glama

Prepare an x402 conditional payment (pay on delivery)

ifso_prepare_x402_conditional
Read-only

For a seller's 402: returns x402 v2 PaymentRequirements (scheme exact, USDG on Robinhood Chain eip155:4663, payTo = the payment's own IFSO v2.1 address) plus the ifso-conditional extension with the full terms. Any facilitator that settles USDG there lands the money at that address. The seller is paid after the release window unless the buyer disputes before it ends; a dispute goes to the named referee, and if the referee stays silent the money comes back to the buyer at expiry. The flat agent fee (0.02 USDG) is added to the amount. Nothing is signed or sent.

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": {
      "amount": "<amount>",
      "payer": "<payer>",
      "payTo": "<payTo>",
      "referee": "<referee>"
    },
    "name": "ifso_prepare_x402_conditional"
  }
}

Input Schema

NameRequiredDescriptionDefault
payToYesThe seller's wallet, paid after the release window.
payerYesThe buyer's wallet: it signs the EIP-3009 transfer, and refunds come back to it.
amountYesUSDG the seller asks for, e.g. "3".
refereeYesWho decides a dispute (neither the buyer nor the seller).
resourceNoWhat is being paid for (a URL).
windowSecNoRelease window in seconds (default 3600).
descriptionNo
maxTimeoutSecondsNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.2/5.0
Behavior5/5

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

Annotations already flag readOnlyHint=true and destructiveHint=false, and the description reinforces and extends this with 'Nothing is signed or sent.' Beyond that it discloses non-obvious economics an agent could not infer: the seller is paid only after the release window, a dispute routes to the named referee, a silent referee refunds the buyer at expiry, and a flat 0.02 USDG agent fee is added to the amount.

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?

Four dense sentences, front-loaded with the trigger and the return value before the money-flow mechanics. Every sentence carries information, but the settlement-prose is packed with domain jargon that risks a single-pass misread.

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?

There is no output schema, so the description must describe the return value, and it does: PaymentRequirements plus the ifso-conditional extension with full terms. Combined with the fee and dispute-flow explanation, an agent has enough to call this correctly, with only the maxTimeoutSeconds cap and the free-text description field left implicit.

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?

With 75% schema coverage the baseline is already a 3, and the description adds real meaning on top: the fee is added to the supplied amount, the release window governs when the seller is paid, and payTo is described as the payment's own IFSO v2.1 address (a nuance worth noting against the schema, which calls payTo 'the seller's wallet'). The two undocumented parameters, description and maxTimeoutSeconds, are still unexplained anywhere.

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 names a specific verb and artifact: it returns x402 v2 PaymentRequirements (scheme exact, USDG on eip155:4663) plus the ifso-conditional extension with full terms. That is concrete enough to distinguish it from ifso_prepare_v2_payment or ifso_prepare_payment, though it never names those siblings, so the differentiation is inferred rather than stated.

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?

The opening 'For a seller's 402' establishes the trigger condition clearly: this is the tool to reach for when a seller has returned a 402 payment challenge that should be settled conditionally. It gives no explicit exclusions or named alternatives (e.g., when to prefer the plain prepare_v2_payment), 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.