Skip to main content
Glama

nwc_lookup_invoice

Look up an invoice by payment hash or bolt11 string to retrieve its payment status, settled timestamp, amount, fees paid, and preimage if settled.

Instructions

Look up an invoice by payment hash or bolt11 string. Returns the invoice state (paid/unpaid), settled timestamp, amount, fees paid, and preimage if settled. Provide either payment_hash OR invoice.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
invoiceNoThe bolt11 invoice string to look up (alternative to payment_hash).
payment_hashNoThe payment hash of the invoice to look up.
Behavior3/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 discloses the return fields and the condition for preimage ('if settled'), but does not explicitly state that this is a read-only operation, what happens if the invoice is not found, or behavior when both parameters are provided. The description is adequate but lacks some behavioral edge cases.

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 core purpose, followed by returned data and parameter instruction. Every word contributes, with no redundancy or filler.

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 simple lookup tool with two optional parameters and no output schema, the description covers the key aspects: input alternatives, returned fields, and conditional preimage. It lacks guidance on error handling or conflicting parameters, but given the tool's low complexity, it is sufficiently complete.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so the baseline is 3. The description adds value by explicitly stating that the two parameters are alternatives ('either payment_hash OR invoice'), clarifying the exclusivity relationship beyond the schema's individual field descriptions. This helps the agent understand how to choose between them.

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 function: 'Look up an invoice by payment hash or bolt11 string.' It specifies the verb, resource, and input types, and distinguishes itself from siblings like nwc_decode_invoice by explicitly listing the returned data (state, timestamp, amount, fees, preimage), which implies it retrieves stored invoice status rather than just decoding.

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 gives parameter usage guidance ('Provide either payment_hash OR invoice') but does not explicitly differentiate when to use this tool versus siblings like nwc_decode_invoice or nwc_list_transactions. The intended use case is implied by the description of returned state information, but no explicit alternatives or exclusions are mentioned.

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