Skip to main content
Glama

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
NameRequiredDescriptionDefault
paywall_idYesPaywall 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);
      },
    );
  • 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);
    },
  • 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'),
    },

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