call_endpoint
Calls x402-protected APIs and handles HTTP 402 payment negotiation automatically. Auto-approves payments under the configured threshold and requests confirmation before higher payments execute.
Instructions
Make a paid API call to an x402-protected endpoint. Handles 402 payment negotiation automatically. Payments under the auto-approve threshold (default $0.05) execute silently. Payments over the threshold return a preview — call again with confirmed: true after user approves. Use discover_endpoints first to find the right URL if you don't know it.
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": "call_endpoint"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | Yes | The full URL of the x402 endpoint to call | |
| body | No | JSON request body (for POST/PUT) | |
| method | No | HTTP method (default: POST) | |
| headers | No | Additional HTTP headers | |
| confirmed | No | Set to true after user confirms a payment that exceeded the auto-approve threshold | |
| prefer_escrow | No | Prefer escrow payment if available (default: false) |