Skip to main content
Glama

test_webhook

Verify webhook functionality by sending a test event to ensure proper integration with the Lightning Wallet MCP server's payment and API systems.

Instructions

Send a test event to a webhook to verify it works. REQUIRES AGENT KEY.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
webhook_idYesID of the webhook to test

Implementation Reference

  • The implementation of the test_webhook functionality in the LightningFaucetClient class.
    /**
     * Send a test event to a webhook
     */
    async testWebhook(webhookId: number): Promise<{
      message: string;
      deliveryId?: number;
      rawResponse: ApiResponse;
    }> {
      const result = await this.request<ApiResponse & {
        message?: string;
        delivery_id?: number;
      }>('test_webhook', { webhook_id: webhookId });
    
      return {
        message: result.message || 'Test event queued',
        deliveryId: result.delivery_id,
        rawResponse: result,
      };
    }
  • The tool handler for test_webhook, which calls the client method and returns the result.
    case 'test_webhook': {
      const parsed = TestWebhookSchema.parse(args);
      const result = await session.requireClient().testWebhook(parsed.webhook_id);
      return {
        content: [
          {
            type: 'text',
            text: JSON.stringify({
              success: true,
              message: result.message || 'Test event sent',
              delivery_id: result.deliveryId,
            }, null, 2),
          },
        ],
      };
    }
  • The Zod schema for validating the inputs of the test_webhook tool.
    const TestWebhookSchema = z.object({
      webhook_id: z.number().int().positive().describe('ID of the webhook to test'),
    });
  • src/index.ts:519-529 (registration)
    The registration and schema definition for the test_webhook tool in the MCP tool list.
    {
      name: 'test_webhook',
      description: 'Send a test event to a webhook to verify it works. REQUIRES AGENT KEY.',
      inputSchema: {
        type: 'object',
        properties: {
          webhook_id: { type: 'integer', description: 'ID of the webhook to test' },
        },
        required: ['webhook_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/lightningfaucet/lightning-wallet-mcp'

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