Skip to main content
Glama

lnurl_auth

Authenticate to services using the LNURL-auth protocol with a Lightning wallet, enabling secure access to L402 and X402 APIs through cryptographic verification.

Instructions

Authenticate to a service using LNURL-auth protocol. REQUIRES AGENT KEY.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
lnurlYesLNURL-auth string to authenticate with

Implementation Reference

  • The implementation of lnurlAuth method in the client class.
    /**
     * Authenticate with LNURL-auth
     */
    async lnurlAuth(lnurl: string): Promise<{
      message: string;
      domain: string;
      rawResponse: ApiResponse;
    }> {
      const result = await this.request<ApiResponse & {
        message?: string;
        domain?: string;
      }>('lnurl_auth', { lnurl });
    
      return {
        message: result.message || 'Authentication successful',
        domain: result.domain || '',
        rawResponse: result,
      };
    }
  • The tool handler in the MCP server that invokes lnurlAuth.
    case 'lnurl_auth': {
      const parsed = LnurlAuthSchema.parse(args);
      const result = await session.requireClient().lnurlAuth(parsed.lnurl);
      return {
        content: [
          {
            type: 'text',
            text: JSON.stringify({
              success: true,
              message: result.message || 'Authentication successful',
              domain: result.domain,
            }, null, 2),
          },
        ],
      };
    }
  • Zod schema for lnurl_auth tool input validation.
    const LnurlAuthSchema = z.object({
      lnurl: z.string().min(1, 'LNURL string is required').describe('LNURL-auth string to authenticate with'),
    });
  • src/index.ts:1757-1766 (registration)
    Tool registration definition for lnurl_auth.
      };
    }
    
    default:
      return {
        content: [
          {
            type: 'text',
            text: JSON.stringify({ success: false, error: `Unknown tool: ${name}` }),
          },
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 authentication and a key requirement, but fails to describe critical behaviors such as what happens on success/failure, whether it's idempotent, rate limits, or security implications. This leaves significant gaps for a tool handling authentication.

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 one sentence with a key requirement highlighted. It's front-loaded with the core purpose and wastes no words, making it efficient and easy to parse.

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 authentication (a security-sensitive operation) and the lack of annotations and output schema, the description is incomplete. It doesn't explain return values, error handling, or behavioral details, which are crucial for safe and effective use in this context.

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 fully documents the single parameter 'lnurl'. The description adds no additional meaning about the parameter beyond what's in the schema (e.g., format examples or usage context), resulting in a baseline score.

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 ('Authenticate') and the protocol used ('LNURL-auth protocol'), which is specific and informative. However, it doesn't explicitly differentiate this tool from other authentication-related tools like 'set_agent_credentials' or 'recover_account', which prevents a perfect score.

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 over alternatives (e.g., other auth methods or sibling tools), leaving usage somewhat implied rather than fully clarified.

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