x402_create_protected_endpoint
Create an HTTP endpoint that requires x402 payment before returning data, with configurable path, method, price, and response payload.
Instructions
Create a new HTTP endpoint protected by x402 payment middleware. The endpoint will require payment before returning data.
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": {
"path": "<path>",
"method": "<method>",
"price": "<price>"
},
"name": "x402_create_protected_endpoint"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | The endpoint path (e.g., '/weather', '/api/data') | |
| price | Yes | Price in USD format (e.g., '$0.10', '$1.50') | |
| method | Yes | HTTP method for the endpoint | |
| description | No | Description of what the endpoint provides | |
| inputSchema | No | JSON schema for input parameters | |
| outputSchema | No | JSON schema for output response | |
| responseData | No | The data to return when payment is verified |