Skip to main content
Glama

Make an x402 request

make_x402_request

Calls an x402-protected URL and, if it returns HTTP 402, pays with the configured wallet or credits within spending limits, then retries and returns the response with settlement receipt.

Instructions

Calls a URL. If it answers HTTP 402, pays with the configured wallet (USDC exact) or Nevermined credits (nvm:erc4337), within the owner's per-call / per-session limits and host allowlist, then retries and returns the response with the settlement receipt. Over-limit requests are not paid.

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": "make_x402_request"
  }
}

Input Schema

NameRequiredDescriptionDefault
urlYesFull URL of the x402-protected endpoint
bodyNoRequest body. Objects/arrays are sent as JSON.
methodNoHTTP method (default GET)
headersNoExtra request headers

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4/5.0
Behavior4/5

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

Beyond annotations (readOnlyHint=false, openWorldHint=true, destructiveHint=false), the description discloses the key risk: this tool spends money from the owner's wallet, is bounded by per-call/per-session limits and a host allowlist, and withholds payment when over limit. It does not cover failure modes such as insufficient funds or a rejected settlement, which keeps it short of a 5.

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?

Two sentences, front-loaded with the primary action and conditional payment path, with the non-payment guard clause last. No redundant restatement of the title.

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?

With no output schema, the description usefully states what is returned (the response plus the settlement receipt) and frames the cost/limit constraints. For a paid, open-world mutation it is nearly complete, missing only error-path behavior and whether headers/body are forwarded verbatim.

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 schema already documents url, body, method, and headers. The description adds no syntax or format meaning beyond noting retry behavior and the payment schemes; baseline 3 applies.

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 (calls a URL, pays on HTTP 402, retries) and names the payment schemes (USDC `exact`, Nevermined `nvm:erc4337`). This clearly distinguishes it from siblings like check_payment_requirements or get_resource_details, which only inspect rather than perform paid requests.

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 implies when payment kicks in (on 402) and states a boundary (over-limit requests are not paid, host allowlist applies), but it never explicitly says when to call this instead of check_payment_requirements or how to pre-check price/allowlist. Usage is inferable rather than stated.

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