Skip to main content
Glama

quote_x402

Fetches an x402 URL to quote its 402 payment requirements without paying or signing, reporting the chain, asset, amount, recipient, and whether caps, spend policy, and budgets allow payment.

Instructions

Ask what an x402 endpoint charges without paying: fetches the URL, parses the 402 requirements, says which option this wallet would pay (chain, asset, amount, recipient), whether the per-payment cap, the spend policy and the rolling budgets would allow it, and nothing is signed. Call it before pay_x402 when the price is unknown.

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

Input Schema

NameRequiredDescriptionDefault
urlYesThe URL to quote
bodyNoOptional request body, as for pay_x402
methodNoHTTP method the real request would useGET
headersNoOptional JSON string of request headers, as for pay_x402
prefer_chainNoPreferred chain ID when several are offered

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv1.14.8
    • addedInput schema / properties / prefer_chain / maximum
      Added value: +9007199254740991
    • addedInput schema / properties / prefer_chain / minimum
      Added value: +-9007199254740991
  2. Addedv1.14.2

TDQS

A4.4/5.0
Behavior4/5

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

With no annotations, the description carries the burden and does well: it discloses that nothing is signed, that the call reports policy/budget/cap eligibility, and that it performs a live fetch of the endpoint. It doesn't cover error behavior (non-402 endpoints, unreachable URL) or side effects of the fetch itself, leaving a real gap for an unannotated tool.

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?

One front-loaded sentence with the no-payment guarantee stated early and the routing advice at the end. It is dense and slightly run-on, but every clause carries information.

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?

There is no output schema, and the description compensates by enumerating what the quote returns: chain, asset, amount, recipient, plus cap/policy/budget verdicts. Nothing an agent needs to call or interpret the result is missing.

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 applies. The description only implicitly touches parameters by mentioning chain preference ('which option this wallet would pay') and by deferring body/headers to 'as for pay_x402'; it adds no syntax or format detail beyond the schema.

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: it fetches the URL, parses the 402 requirements, and reports which payment option this wallet would use. It also explicitly distinguishes itself from pay_x402 by stating nothing is signed and nothing is paid.

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 an explicit trigger ('Call it before pay_x402 when the price is unknown') and names the sibling it precedes. An agent knows exactly when to choose this over pay_x402 or discover_x402.

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