x402_pay_for_resource
Fetch x402-protected URLs by automatically paying with USDC when the price is within your set maximum limit.
Instructions
Fetch an x402-protected URL, automatically paying for it with USDC if the price is within max_price
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>",
"max_price": "<max_price>"
},
"name": "x402_pay_for_resource"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | Yes | URL of the x402-protected resource | |
| max_price | Yes | Maximum USDC you are willing to pay, e.g. "0.01" | |
| network | No | Network to use: testnet (default) or mainnet |