Skip to main content
Glama

nwc_decode_invoice

Decode a bolt11 Lightning invoice locally without network calls to inspect amount, description, payment hash, expiry, payee, and network before payment.

Instructions

Decode a bolt11 Lightning invoice locally (no network call). Returns amount in sats, description, payment hash, expiry, payee pubkey, and network. Use this before pay_invoice to confirm the invoice contents.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
invoiceYesThe bolt11 invoice string to decode.
Behavior4/5

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

With no annotations provided, the description carries the full burden. It clearly states the operation is performed 'locally (no network call)' and enumerates the return fields (amount in sats, description, payment hash, expiry, payee pubkey, network). This gives a good sense of what the tool does, though it doesn't mention error handling or validation details.

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, front-loaded with the main action, and includes a clear use-case pointer. Every sentence adds value: the first explains what/where, the second explains when and why. No fluff.

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

Completeness5/5

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

For a simple single-parameter tool with no output schema, the description is complete: it states the input type, the execution context (local, no network), the returned fields, and a practical usage scenario. The sibling list reinforces its role, but the description itself is sufficient.

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?

The input schema already has 100% coverage for the single parameter 'invoice' with description 'The bolt11 invoice string to decode.' The tool description does not add additional meaning to that parameter beyond confirming it's a bolt11 invoice, so the baseline of 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 clearly states the tool's action: 'Decode a bolt11 Lightning invoice locally'. It specifies the resource (bolt11 invoice) and the verb (decode), and distinguishes from siblings like 'pay_invoice' by emphasizing the local, non-network nature and its role as a pre-payment check.

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 explicit when-to-use guidance: 'Use this before pay_invoice to confirm the invoice contents.' It also implies a context (local decode, no network). However, it does not mention when not to use it or contrast with alternative tools like 'lookup_invoice', so it falls short of full 5.

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