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
| Name | Required | Description | Default |
|---|---|---|---|
| webhook_id | Yes | ID of the webhook to test |
Implementation Reference
- src/lightning-faucet.ts:658-676 (handler)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, }; } - src/index.ts:1211-1226 (handler)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), }, ], }; } - src/index.ts:175-177 (schema)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'], }, },