Skip to main content
Glama

register_webhook

Register HTTPS webhook URLs to receive real-time notifications for payment events like invoice_paid, payment_completed, and balance_changed from a Bitcoin Lightning wallet.

Instructions

Register a webhook URL to receive payment notifications. Max 5 webhooks per agent. REQUIRES AGENT KEY.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
urlYesHTTPS webhook URL to receive events
eventsNoEvent types to subscribe to

Implementation Reference

  • Handler method to register a webhook with the Lightning Faucet API.
    async registerWebhook(
      url: string,
      events: string[] = ['invoice_paid']
    ): Promise<{
      webhookId: number;
      url: string;
      events: string[];
      secret: string;
      rawResponse: ApiResponse;
    }> {
      const result = await this.request<ApiResponse & {
        webhook_id?: number;
        url?: string;
        events?: string[];
        secret?: string;
      }>('register_webhook', { url, events });
    
      return {
        webhookId: result.webhook_id || 0,
        url: result.url || url,
        events: result.events || events,
        secret: result.secret || '',
        rawResponse: result,
      };
    }
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of behavioral disclosure. It effectively communicates key behavioral traits: the mutation nature ('Register'), a system constraint ('Max 5 webhooks per agent'), and an authentication requirement ('REQUIRES AGENT KEY'), though it lacks details on response format or error conditions.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is extremely concise and front-loaded, with every sentence adding essential information: the core purpose, a system constraint, and an authentication requirement. There is zero wasted text, making it highly efficient.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a mutation tool with no annotations and no output schema, the description is reasonably complete, covering purpose, constraints, and authentication. However, it lacks details on the response format (e.g., success confirmation or webhook ID) and potential error scenarios, which would enhance completeness.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, providing complete parameter documentation. The description adds minimal value beyond the schema, only implying the 'url' parameter's purpose ('to receive payment notifications') without enhancing parameter understanding. The baseline score of 3 is appropriate given the comprehensive schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the specific action ('Register a webhook URL') and resource ('to receive payment notifications'), distinguishing it from sibling tools like 'list_webhooks' or 'delete_webhook'. It precisely defines the tool's function without being tautological.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides clear context for when to use this tool ('to receive payment notifications') and includes prerequisites ('REQUIRES AGENT KEY'), but does not explicitly state when not to use it or name alternatives like 'test_webhook' for testing webhooks.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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