Skip to main content
Glama

claim_lnurl_withdraw

Claim funds from an LNURL-withdraw link using the Lightning Wallet MCP server to process Bitcoin Lightning withdrawals.

Instructions

Claim funds from an LNURL-withdraw link. REQUIRES AGENT KEY.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
lnurlYesLNURL-withdraw string to claim from

Implementation Reference

  • The implementation of the claimLnurlWithdraw method which sends the 'claim_lnurl_withdraw' request to the Lightning Faucet API.
    async claimLnurlWithdraw(lnurl: string): Promise<{
      message: string;
      amountSats: number;
      paymentHash: string;
      newBalance: number;
      rawResponse: ApiResponse;
    }> {
      const result = await this.request<ApiResponse & {
        message?: string;
        amount_sats?: number;
        payment_hash?: string;
        new_balance?: number;
      }>('claim_lnurl_withdraw', { lnurl });
    
      return {
        message: result.message || 'Withdrawal claimed',
        amountSats: result.amount_sats || 0,
        paymentHash: result.payment_hash || '',
        newBalance: result.new_balance || 0,
        rawResponse: result,
      };
    }
  • The Zod schema definition for input validation of the claim_lnurl_withdraw tool.
    const ClaimLnurlWithdrawSchema = z.object({
      lnurl: z.string().min(1, 'LNURL string is required').describe('LNURL-withdraw string to claim from'),
    });
  • src/index.ts:768-777 (registration)
    The registration of the 'claim_lnurl_withdraw' tool in the tool list.
      name: 'claim_lnurl_withdraw',
      description: 'Claim funds from an LNURL-withdraw link. REQUIRES AGENT KEY.',
      inputSchema: {
        type: 'object',
        properties: {
          lnurl: { type: 'string', description: 'LNURL-withdraw string to claim from' },
        },
        required: ['lnurl'],
      },
    },
  • The tool call handler for 'claim_lnurl_withdraw' which invokes the client method.
    case 'claim_lnurl_withdraw': {
      const parsed = ClaimLnurlWithdrawSchema.parse(args);
      const result = await session.requireClient().claimLnurlWithdraw(parsed.lnurl);
      return {
        content: [
          {
            type: 'text',
            text: JSON.stringify({
              success: true,
              message: result.message || 'Withdrawal claimed',
              amount_sats: result.amountSats,
              payment_hash: result.paymentHash,
              new_balance: result.newBalance,
            }, null, 2),
          },
        ],
      };
    }
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. It mentions the agent key requirement, which is useful, but lacks details on behavioral traits like whether the claim is irreversible, rate limits, error conditions, or what happens on success. This leaves significant gaps for a financial operation.

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?

It is front-loaded and appropriately sized with two concise sentences that directly convey the purpose and key requirement, with no wasted words or unnecessary elaboration.

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 the complexity of a financial claim operation, no annotations, and no output schema, the description is incomplete. It lacks details on return values, error handling, security implications, or how the claim process works, which are critical for safe and effective use.

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%, so the schema already documents the 'lnurl' parameter. The description does not add meaning beyond what the schema provides, such as format examples or constraints, but the baseline is 3 when schema coverage is high.

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 ('claim funds') and resource ('from an LNURL-withdraw link'), distinguishing it from sibling tools like 'create_withdraw_link' or 'withdraw' by focusing on claiming rather than creating or initiating withdrawals.

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?

It provides explicit context for when to use this tool ('REQUIRES AGENT KEY'), indicating a prerequisite. However, it does not specify when not to use it or name alternatives among siblings, such as how it differs from 'withdraw'.

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