Skip to main content
Glama

pay_invoice

Pay BOLT11 Lightning invoices directly and receive proof of payment, enabling autonomous transactions for API access, resources, and payments without L402 protocol overhead.

Instructions

Pay a Lightning invoice directly and get the preimage as proof of payment. Use this to pay any BOLT11 Lightning invoice without L402 protocol overhead.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
invoiceYesBOLT11 Lightning invoice string to pay
max_satsNoMaximum satoshis allowed to pay. Defaults to 1000
confirmedNoSet to true to confirm a payment that requires approval. Use when previous call returned requiresConfirmation=true.
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 output ('preimage as proof of payment') but lacks details on permissions, rate limits, error handling, or what happens if payment fails. For a payment tool with zero annotation coverage, this is insufficient for safe agent use.

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 two sentences with zero waste: the first states the purpose and output, and the second provides usage context. It is front-loaded with key information and appropriately sized for the tool's complexity.

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

Completeness3/5

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

Given no annotations and no output schema, the description should do more to explain behavioral aspects like payment confirmation flow (hinted by the 'confirmed' parameter) or error cases. It covers basic purpose and usage but lacks completeness for a payment operation with potential financial implications.

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 fully documents the parameters. The description does not add any semantic details beyond what the schema provides (e.g., it doesn't explain invoice format or max_sats implications). Baseline 3 is appropriate as the schema handles parameter documentation adequately.

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 action ('Pay a Lightning invoice directly') and the resource ('BOLT11 Lightning invoice'), distinguishing it from siblings like 'pay_l402_challenge' by specifying 'without L402 protocol overhead'. It also mentions the output ('get the preimage as proof of payment'), making the purpose specific and well-defined.

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 pay any BOLT11 Lightning invoice without L402 protocol overhead'), implicitly distinguishing it from 'pay_l402_challenge'. However, it does not explicitly state when not to use it or mention alternatives like 'send_onchain' for non-Lightning payments, leaving some guidance gaps.

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/refined-element/lightning-enable-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server