Skip to main content
Glama

pay_lightning_address

Send Bitcoin Lightning payments to addresses in user@domain.com format using the Lightning Wallet MCP server, enabling AI agents to execute transactions with specified amounts and optional comments.

Instructions

Pay to a Lightning address (user@domain.com format). REQUIRES AGENT KEY.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
addressYesLightning address (user@domain.com)
amount_satsYesAmount in satoshis to send
commentNoOptional payment comment

Implementation Reference

  • Implementation of payLightningAddress in LightningFaucetClient, which sends a request to the Lightning Faucet API.
    async payLightningAddress(
      address: string,
      amountSats: number,
      comment?: string
    ): Promise<{
      amountSats: number;
      feeSats: number;
      paymentHash: string;
      newBalance: number;
      rawResponse: ApiResponse;
    }> {
      const data: Record<string, unknown> = {
        address,
        amount_sats: amountSats,
      };
      if (comment) data.comment = comment;
    
      const result = await this.request<ApiResponse & {
        amount_sats?: number;
        fee_sats?: number;
        payment_hash?: string;
        new_balance?: number;
      }>('pay_lightning_address', data);
    
      return {
        amountSats: result.amount_sats || amountSats,
        feeSats: result.fee_sats || 0,
        paymentHash: result.payment_hash || '',
        newBalance: result.new_balance || 0,
        rawResponse: result,
      };
    }
  • MCP tool handler registration for pay_lightning_address in index.ts.
    case 'pay_lightning_address': {
      const parsed = PayLightningAddressSchema.parse(args);
      const result = await session.requireClient().payLightningAddress(
        parsed.address,
        parsed.amount_sats,
        parsed.comment
      );
      return {
        content: [
          {
            type: 'text',
            text: JSON.stringify({
              success: true,
              message: `Paid ${parsed.amount_sats} sats to ${parsed.address}`,
              amount_sats: result.amountSats,
              fee_sats: result.feeSats,
              payment_hash: result.paymentHash,
              new_balance: result.newBalance,
            }, null, 2),
          },
        ],
      };
    }
  • Zod input schema for pay_lightning_address tool.
    const PayLightningAddressSchema = z.object({
      address: z.string().regex(/^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$/, 'Invalid Lightning address format (expected user@domain)')
        .describe('Lightning address (user@domain.com format)'),
      amount_sats: z.number().int().positive().max(10_000_000).describe('Amount in satoshis to send'),
      comment: z.string().max(144).optional().describe('Optional payment comment'),
    });
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. It mentions the prerequisite 'REQUIRES AGENT KEY', which hints at authentication needs, but fails to describe critical behaviors such as whether the payment is irreversible, if there are rate limits, what happens on failure, or what the response looks like. For a payment tool with zero annotation coverage, this is a significant gap in transparency.

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—just two sentences with no wasted words. It front-loads the core purpose and follows with a critical prerequisite, making it easy to parse quickly. Every sentence earns its place by providing essential information.

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

Completeness2/5

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

Given that this is a payment tool with no annotations and no output schema, the description is incomplete. It lacks details on behavioral traits (e.g., irreversibility, error handling), response format, or integration with sibling tools. The prerequisite is noted, but overall, the description does not provide enough context for safe and effective use in a complex environment with multiple payment options.

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%, meaning the input schema already fully documents the parameters (address, amount_sats, comment). The description adds no additional semantic information about the parameters beyond what is in the schema, such as examples or constraints not covered by the schema. Thus, it meets the baseline score of 3 for high schema coverage without adding value.

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

Purpose4/5

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

The description clearly states the action ('Pay to a Lightning address') and specifies the required format ('user@domain.com format'), making the purpose unambiguous. However, it does not explicitly differentiate this tool from sibling payment tools like 'pay_invoice' or 'keysend', which would require a more specific comparison to achieve a score of 5.

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

Usage Guidelines3/5

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

The description includes a prerequisite ('REQUIRES AGENT KEY'), which provides some context for when to use this tool. However, it lacks explicit guidance on when to choose this tool over alternatives like 'pay_invoice' or 'keysend', and does not mention any exclusions or specific scenarios where it should not be used.

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