Skip to main content
Glama

Quote a payment

quote
Read-only

Prices a payment of a given USD amount in a chosen token, returning the cost so agents can preview x402 API charges before paying.

Instructions

Prices a payment of a given USD amount in a given token (default: the configured pay-with token, or USDG).

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": {
      "usd": "<usd>"
    },
    "name": "quote"
  }
}

Input Schema

NameRequiredDescriptionDefault
usdYesAmount the API should receive, in dollars, e.g. "0.05"
tokenNoToken to pay with (0x…). Omit for the default.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.6/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=true and openWorldHint=true, so the safety profile is covered. The description adds a genuinely useful behavioral detail — the default token resolves to the configured pay-with token, falling back to USDG — but says nothing about quote validity, expiry, or whether the returned price is guaranteed at execution time, which matters for a pricing tool.

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?

One sentence, front-loaded with the core action, with the default-token caveat in parentheses rather than padding the main clause. Nothing is wasted and nothing essential is buried.

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?

There is no output schema, so the description carries the burden of describing what a quote returns — price, expiry, quote identifier, or supported-token errors — and it does none of that. For a simple two-parameter read tool this is a moderate rather than fatal gap, but an agent cannot tell what it will receive back.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so the baseline is 3, but the description goes beyond the schema by explaining what 'omit for the default' actually resolves to (configured pay-with token, or USDG). That resolution rule is not in the schema and directly changes what an agent should pass.

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?

The description uses a specific verb ('Prices') plus a concrete resource ('a payment of a given USD amount in a given token'), so it is immediately distinguishable from a sibling like 'pay' that presumably executes. It stops short of explicitly naming what it is not, but the pricing-vs-executing distinction is inferable from the wording.

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?

Usage is only implied: an agent can guess this is the pre-flight step before 'pay', but the description never says 'call this before pay' or states when a fresh quote is needed. No exclusions or prerequisites (e.g., wallet funded, supported tokens) are given.

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

Deploy Server

Other Tools