Skip to main content
Glama

Pay x402 Resource With Agent

agent_x402_pay

Pays for and fetches an x402-protected HTTPS resource using a wallet's ERC-7710 delegation, enabling AI assistants to access paid APIs and content.

Instructions

Pay and fetch an x402-protected HTTPS resource. The default agent profile spends through the main wallet's ERC-7710 delegation; explicitly pass agent-eoa: only for raw agent-wallet payment.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
urlYesHTTPS x402-protected resource URL.
bodyNoOptional string or JSON body. Only allowed with POST.
chainNoEVM network for x402 payment. Defaults to Base.
methodNoHTTP method. Defaults to GET; body implies POST.
headersNoOptional string headers. Authorization, Cookie, Host, and payment headers are blocked.
walletIdNoAgent wallet ID. Alternative to profileId; resolves to the delegated agent:<walletId> profile.
profileIdNoAgent wallet profile ID. Defaults to agent:<walletId> delegated x402. Use agent-eoa:<walletId> only when the user explicitly wants raw local agent-wallet payment.
timeoutMsNoRequest timeout in milliseconds. Defaults to 30000.
maxPaymentNoMaximum payment in decimal token units, e.g. 0.10 USDC. Required unless maxPaymentUnits is provided.
tokenDecimalsNoDecimals for maxPayment. Defaults to 6 for USDC.
maxPaymentUnitsNoMaximum payment in raw token units. Required unless maxPayment is provided.
maxResponseBytesNoMaximum response body bytes returned by MCP. Defaults to 1000000.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.4.0

TDQS

B3.4/5.0
Behavior3/5

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

With no annotations, the description carries the full behavioral burden. It usefully discloses the payment path (ERC-7710 delegation vs raw EOA) and that the EOA path is the exceptional one, but omits critical traits for a payment tool: irreversibility of the spend, whether a delegation must pre-exist, and failure/settlement behavior when the resource returns an error.

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?

Two tight sentences: purpose first, then the one non-obvious default-versus-explicit decision. Nothing is wasted, though the second sentence packs two distinct ideas (default path and exception) into one clause and could front-load the exception more sharply.

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

Completeness3/5

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

For a 12-parameter payment tool with no annotations and no output schema, the description covers the central profile tradeoff but leaves out prerequisites, spend irreversibility, and how to obtain a quote before paying. Adequate but with clear gaps an agent would need filled elsewhere.

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 the baseline is 3. The one bit of parameter guidance in the description (profileId / agent-eoa form) is already documented verbatim in the schema's profileId field, so the prose adds little beyond what the structured data provides.

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?

States a specific verb pair (pay and fetch) and a precise resource type (x402-protected HTTPS resource), which is more specific than most siblings. It does not explicitly differentiate itself from near-neighbors like veil_pay_x402 or agent_x402_quote, so an agent must infer the boundary rather than being told it.

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

Usage Guidelines3/5

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

The description does give genuinely useful routing guidance for the profile choice: default uses the main wallet's ERC-7710 delegation, and agent-eoa:<walletId> is only for raw agent-wallet payment. However it never says when to call this versus the sibling quote tools (agent_x402_quote, veil_x402_quote) or what prerequisites (e.g. an established delegation) must hold first.

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