Skip to main content
Glama

x402_quote

Check a URL's x402 payment requirements and validate each option against payment rules before fetching; returns JSON checks and a quote ID, and never signs or pays.

Instructions

Show the x402 payment requirements of a URL and whether each option passes the payment rules. Never signs or pays. Returns JSON with each payment option, the rule checks and a quoteId that x402_fetch can use to pin the amount, asset and recipient; result "refused" (an error) means no option passes. Call this before x402_fetch.

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

Input Schema

NameRequiredDescriptionDefault
urlYesFull https URL of the paid API endpoint. Its host must be in X402_ALLOWED_DOMAINS.
bodyNoRequest body for POST, as text (at most 100,000 characters).
methodNoHTTP method (default GET).
headersNoExtra request headers, for example content-type. Payment headers are added by the tool.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed4 schema fields changedv0.1.1
    • addedInput schema / properties / body / description
      Added value: +"Request body for POST, as text (at most 100,000 characters)."
    • addedInput schema / properties / headers / description
      Added value: +"Extra request headers, for example content-type. Payment headers are added by the tool."
    • addedInput schema / properties / method / description
      Added value: +"HTTP method (default GET)."
    • addedInput schema / properties / url / description
      Added value: +"Full https URL of the paid API endpoint. Its host must be in X402_ALLOWED_DOMAINS."
  2. First observedv0.1.0

TDQS

A4.1/5.0
Behavior4/5

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

No annotations exist, so the description carries the whole burden and does well: it declares the safety profile ('Never signs or pays'), describes the return payload (each payment option, rule checks, quoteId), and explains the 'refused' error semantics. It does not mention network side effects, latency, or authentication requirements beyond what the schema says about allowed domains.

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?

Content is front-loaded: purpose, then safety, then return shape, then the call-ordering instruction. Every clause carries information, but the middle sentence is a long semicolon-chained block that could be split for easier scanning.

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 correctly compensates by summarizing the JSON result and the quoteId handoff to x402_fetch, and by explaining the 'refused' outcome. A four-parameter tool with nested headers is adequately covered, though call-ordering and error handling could be spelled out slightly more.

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 coverage is 100%, with per-parameter descriptions including the X402_ALLOWED_DOMAINS constraint, POST body limit, and the note that payment headers are added by the tool. The description adds no parameter-level meaning beyond that, so the 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?

Names a specific verb and resource: 'Show the x402 payment requirements of a URL and whether each option passes the payment rules.' It also explicitly distinguishes itself from x402_fetch by stating it 'Never signs or pays', so an agent can tell a dry-run check apart from the tool that actually pays.

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?

Gives clear sequencing guidance: 'Call this before x402_fetch.' That is an explicit prerequisite relationship with a named sibling. It stops short of stating when not to call it (e.g. free endpoints, already-pinned quotes), so it is strong but not fully exhaustive.

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