x402 pre-flight check (will this URL accept payment, what it costs)
x402_preflight[PAID $0.005 USDC per call via x402 on Base; errors are free] For developers of buyer agents. Makes ONE unpaid request (GET, POST fallback if GET is not allowed; 4 s timeout; max 2 redirects; 64 KB read) to the target and parses its HTTP 402 challenge (v2 PAYMENT-REQUIRED base64 header or v1 JSON body). Returns normalised accepts[] (scheme, CAIP-2 network, asset, amount in USD, payTo), pass/fail checks (valid challenge, supported mainnet network, USDC asset, parseable amount within a sanity cap, well-formed payTo, latency, TLS, Bazaar metadata, CORS), a verdict with plain reasons, latency, and the measured /ai-search score + sample size when the host is in our index. NEVER sends a payment or payment header. https + public hostnames + port 443 only; IPs, localhost, .local/.internal and credentials refused (400). Unreachable/timeout target = 502/504 JSON with verdict do_not_pay, never charged.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "x402_preflight"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | No | https URL of the x402 endpoint your agent plans to pay (public hostname, port 443). |