Skip to main content
Glama
presign-guard-wallet-mcp

presign-guard-wallet-mcp

Pay for an x402 API

pay_x402

Calls an API URL, pays any 402 Payment Required challenge in USDC from the wallet under presign-guard spending limits, and returns the response.

Instructions

Call a URL that may answer 402 Payment Required and pay it in USDC from this wallet, then return the response. Works with x402 and with MPP (the Machine Payments Protocol): method evm (USDC on this wallet's chain) and method tempo (USDC.e on Tempo, from this wallet's address there). With a Solana or Algorand account set up, x402 offers in USDC there are paid too, and with an XRPL account x402 offers in RLUSD on the XRP Ledger (all after USDC on this chain). When an API offers several, x402 comes first, then MPP evm, then Tempo. The payment is checked by presign-guard and counts toward the spending limits; over a limit the owner is asked to approve (the call waits), and a refusal comes back as an error with the reason. max_price_usd caps the price of this call. If the API doesn't answer properly after a payment, the result says whether the payment was taken on-chain (charge), and paying that endpoint again is refused while the first payment can still be collected, or for an hour after it was taken without an answer: don't try to get around that, tell the owner.

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": {
      "url": "<url>"
    },
    "name": "pay_x402"
  }
}

Input Schema

NameRequiredDescriptionDefault
urlYesThe API URL
bodyNoRequest body: a string, or an object sent as JSON
methodNoHTTP method (default GET)
reasonNoWhat this is for, in a few words (shown to the owner on the receipt and in approval requests)
headersNoExtra request headers, e.g. content-type
max_price_usdNoThe most this call may cost, in dollars (never above the server's MAX_PAYMENT_USD)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.6/5.0
Behavior5/5

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

Only openWorldHint is annotated, so the description carries the behavioral burden and does: presign-guard checking, spending-limit accounting, owner approval that makes the call wait, refusals surfaced as errors with reasons, and post-payment charge/retry semantics with the one-hour lockout.

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?

Front-loads the core action and is dense with useful detail, but the middle rail-selection sentence is long and run-on, packing four conditional chains into one breath.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

No output schema exists, yet the description covers the response (returns the response, reports whether payment was taken on-chain as a charge) plus error and retry behavior. An agent has enough to call and interpret results 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 only reiterates that max_price_usd caps this call's price. Baseline 3 applies since the schema does the heavy lifting.

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: call a URL that may answer 402 and pay it in USDC, then return the response. That cleanly separates it from siblings like send_usdc or send_native, which move funds without an HTTP call.

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

Usage Guidelines5/5

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

Gives explicit decision rules for choosing a payment rail (x402 first, then MPP evm, then Tempo) and for conditional rails (Solana, Algorand, XRPL). It also sets when-not behavior: on a refused endpoint, 'don't try to get around that, tell the owner.'

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.