Skip to main content
Glama

nwc_pay_invoice

Pay a bolt11 Lightning invoice after local decoding and safety checks. Supports amountless invoices with an amount override and returns the preimage and fees.

Instructions

Pay a bolt11 Lightning invoice. Decodes locally, runs the safety pipeline (read-only gate, destination allowlist, budget cap), and either executes immediately or — if NWC_REQUIRE_CONFIRM=true — returns a one-time confirmation token to pass to nwc_confirm_payment. Returns preimage + fees on success.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
invoiceYesThe bolt11 invoice to pay (lnbc...).
amount_override_satsNoAmount in sats — required for amountless invoices; rejected if the invoice already encodes an amount.
Behavior4/5

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

With no annotations, the description carries the full burden and discloses the safety pipeline (read-only gate, destination allowlist, budget cap), the conditional confirmation token, and the success return (preimage + fees). It could be more explicit about error scenarios or the exact meaning of the read-only gate, but it is substantially transparent.

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 three well-structured sentences that front-load the main action and then deliver safety behavior, confirmation flow, and return value. Every sentence adds value with no redundancy or fluff.

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 payment tool with no output schema and no annotations, the description covers the safety checks, conditional confirmation, and return value. It lacks error-handling details and the exact confirmation token format, but the reference to nwc_confirm_payment covers the follow-up step, making it adequately complete for an agent.

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 coverage is 100%, so both parameters (invoice and amount_override_sats) are already well-described in the schema. The description's mention of 'bolt11' and local decoding adds minimal extra context, and it does not elaborate on parameter syntax beyond what the schema provides. Baseline 3 is appropriate.

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 opens with 'Pay a bolt11 Lightning invoice,' clearly identifying the action and resource. It further distinguishes from siblings by noting the local decode and safety pipeline, and implicitly excluding other payment types (e.g., keysend, LNURL) through tool naming and context.

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 clear context for when to use this tool (bolt11 invoices) and explicitly explains the confirmation flow tie-in with nwc_confirm_payment if NWC_REQUIRE_CONFIRM=true. It doesn't explicitly name alternatives like nwc_multi_pay_invoice or nwc_pay_lightning_address, but the sibling list makes those distinctions obvious.

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/llmops-pro/nwc-mcp'

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