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
| Name | Required | Description | Default |
|---|---|---|---|
| url | Yes | The URL to quote | |
| body | No | Optional request body, as for pay_x402 | |
| method | No | HTTP method the real request would use | GET |
| headers | No | Optional JSON string of request headers, as for pay_x402 | |
| prefer_chain | No | Preferred chain ID when several are offered |