Skip to main content
Glama

Check an x402 conditional offer before signing

ifso_check_x402_offer
Read-onlyIdempotent

Run before signing a 402 that carries the ifso-conditional extension. Recomputes the payment address from the terms against IFSO's own v2.1 factory and refuses: an untrusted factory, a terms hash mismatch, a payTo that is not the terms' address, an amount or asset mismatch, a sender that is not the payer, a refund address that is not the payer, expired terms, a closed window or a window without a referee. Optionally checks the signed EIP-3009 authorization (to, value, from). Read only.

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": {
      "requirements": "<requirements>"
    },
    "name": "ifso_check_x402_offer"
  }
}

Input Schema

NameRequiredDescriptionDefault
payerNoYour wallet (the buyer).
payloadNoOptional: {authorization:{from,to,value}} of the EIP-3009 transfer you signed.
maxAmountNoMost you will pay, in USDG base units (6 decimals).
extensionsNoThe 402's extensions object, unchanged.
requirementsYesThe PaymentRequirements entry from the 402 (accepts[i]).

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.6/5.0
Behavior5/5

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

Annotations already declare read-only, idempotent, non-destructive, so the safety profile is covered; the description uses its space to disclose actual behavior instead. It enumerates the specific refusal conditions — untrusted factory, terms hash mismatch, payTo not matching terms, amount/asset mismatch, payer mismatch, expired terms, closed window, window without referee — which tells the agent exactly what can fail and why, well beyond structured fields.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The when-to-use trigger is front-loaded in one sentence, followed by the behavioral detail and a closing safety statement ('Read only'). Every clause in the refusal list names a distinct failure mode and earns its place; nothing is repeated from the annotations or schema.

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?

For a read-only validator with five parameters (one required, nested objects) and no output schema, the description covers purpose, preconditions, and failure modes thoroughly. The remaining gap is the success path: it never says what a passing result contains (the recomputed address? a boolean?) or whether a refusal raises an error versus returning a status, which matters when there is no output schema to consult.

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 already 100%, so the baseline is 3. The description adds real meaning on top by labeling the optional payload check as validating the signed EIP-3009 authorization's to, value, and from — tying payload sub-fields to a concrete verification. It does not clarify maxAmount or how requirements relates to extensions, so it sits just above baseline.

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 gives a specific verb and resource — it recomputes the payment address from a 402's terms against IFSO's v2.1 factory before the user signs. The opening sentence ('Run before signing a 402 that carries the ifso-conditional extension') positions it precisely against the sibling family (prepare_x402_conditional, explain_payment, get_payment) by naming the artifact it consumes and the moment it runs.

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?

Usage context is explicit: call it before signing, and only for 402s carrying the ifso-conditional extension. That is a clear when-to-use condition. It stops short of naming the alternative (e.g., 'if you have not yet produced the 402, use ifso_prepare_x402_conditional first') or stating when the check is unnecessary, so no exclusions are given.

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.