get_paywall
Retrieve x402 paywall details including pricing, access URL, payment statistics, and configuration using a specific paywall ID.
Instructions
Get details for a specific x402 paywall by ID. Returns pricing, access URL, payment stats, and configuration.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| paywall_id | Yes | Paywall ID |
Implementation Reference
- src/index.ts:1280-1293 (registration)Registration of the 'get_paywall' MCP tool using server.tool(). Defines the tool name, description, input schema using Zod, and the async handler function that calls the AgentWallet API to retrieve paywall details.
// ─── Tool: get_paywall ────────────────────────────────────────── server.tool( 'get_paywall', 'Get details for a specific x402 paywall by ID. ' + 'Returns pricing, access URL, payment stats, and configuration.', { paywall_id: z.number().int().describe('Paywall ID'), }, async ({ paywall_id }) => { const data = await api(`/x402/paywalls/${paywall_id}`); return jsonResponse(data); }, ); - src/index.ts:1289-1292 (handler)The handler function for 'get_paywall' tool. Takes paywall_id as input, makes an API call to /x402/paywalls/{paywall_id}, and returns the paywall details (pricing, access URL, payment stats, configuration) as JSON.
async ({ paywall_id }) => { const data = await api(`/x402/paywalls/${paywall_id}`); return jsonResponse(data); }, - src/index.ts:1286-1288 (schema)Zod schema definition for the 'get_paywall' tool input. Defines paywall_id as a required integer parameter with a description.
{ paywall_id: z.number().int().describe('Paywall ID'), },