Skip to main content
Glama

Agent Data Tools: Chain data

ln_invoice

Decode a BOLT11 Lightning Network invoice without paying it: network, amount in sats and BTC, description, payment hash, creation time, expiry time and whether it has already expired. Use to check what an invoice asks for before an agent pays it. Costs $0.002 in USDC on Base per successful call, paid with x402.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
invoiceYesBOLT11 invoice string starting with ln (lnbc... for mainnet)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.3/5.0
Behavior4/5

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

Annotations only supply generic hints, and the description adds genuinely useful context beyond them: the operation does not pay the invoice, the output surface is listed, and the cost is $0.002 USDC on Base via x402 charged per successful call. It stops short of describing failure behavior for malformed invoices, which is the only real gap.

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?

Two sentences, zero filler, and the safety-relevant constraint ('without paying it') is front-loaded before the return-field list and cost. Every clause carries information an agent needs.

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?

With no output schema, the description fully enumerates the returned fields (network, amount in sats and BTC, description, payment hash, creation/expiry times, expired flag) and discloses the payment requirement. Nothing needed to call it correctly is missing.

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% and the single parameter is documented there (BOLT11 string starting with ln, lnbc mainnet). The description adds no syntax or format detail beyond what the schema already supplies, so baseline 3 applies.

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?

States a specific verb (Decode) and resource (BOLT11 Lightning Network invoice) and immediately bounds the scope with 'without paying it'. No sibling tool decodes LN invoices, and the enumerated return fields make the operation's surface unambiguous.

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?

'Use to check what an invoice asks for before an agent pays it' gives a clear triggering condition. No explicit alternative or exclusion is named, but there is no competing sibling that would need one.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources