delete_paywall
Remove an x402 paywall to make content freely accessible by deleting it from the system, causing the access URL to return a 404 error.
Instructions
Delete an x402 paywall. The access URL will return 404 after deletion.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| paywall_id | Yes | Paywall ID to delete |
Implementation Reference
- src/index.ts:1330-1342 (registration)Registration of the 'delete_paywall' tool using server.tool() with the tool name, description, Zod schema for input validation, and the handler function.
// ─── Tool: delete_paywall ─────────────────────────────────────── server.tool( 'delete_paywall', 'Delete an x402 paywall. The access URL will return 404 after deletion.', { paywall_id: z.number().int().describe('Paywall ID to delete'), }, async ({ paywall_id }) => { const data = await api(`/x402/paywalls/${paywall_id}`, 'DELETE'); return jsonResponse(data); }, ); - src/index.ts:1338-1341 (handler)Handler function for delete_paywall: takes paywall_id parameter, makes a DELETE request to the /x402/paywalls/{paywall_id} API endpoint, and returns the JSON response.
async ({ paywall_id }) => { const data = await api(`/x402/paywalls/${paywall_id}`, 'DELETE'); return jsonResponse(data); }, - src/index.ts:1335-1336 (schema)Zod schema defining the input parameter: paywall_id as a required integer with description.
{ paywall_id: z.number().int().describe('Paywall ID to delete'),