Skip to main content
Glama

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
NameRequiredDescriptionDefault
paywall_idYesPaywall 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);
      },
    );
  • 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);
    },
  • Zod schema defining the input parameter: paywall_id as a required integer with description.
    {
      paywall_id: z.number().int().describe('Paywall ID to delete'),

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/hifriendbot/agentwallet-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server