Skip to main content
Glama
bjunjo

treasury-mcp

by bjunjo

decode_bolt11_invoice

Decode BOLT11 Lightning invoices to extract network, amount, and timestamp data for Bitcoin payment analysis without external dependencies.

Instructions

Decode a BOLT11 Lightning invoice without external dependencies.

Parses the human-readable part to extract network, amount, and timestamp. Does NOT verify the signature or parse tagged fields beyond basic extraction.

Args: invoice: BOLT11 payment request string (starts with lnbc, lntb, or lnbcrt)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
invoiceYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
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 of behavioral disclosure. It does this well by specifying key behavioral traits: it works 'without external dependencies,' extracts specific information (network, amount, timestamp), and importantly discloses limitations ('Does NOT verify the signature or parse tagged fields beyond basic extraction'). This provides clear expectations about what the tool can and cannot do.

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 perfectly structured and concise. It begins with the core purpose, then explains what it parses, explicitly states limitations, and finally documents the parameter. Every sentence earns its place with no wasted words, and the information is front-loaded appropriately.

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?

Given the tool's moderate complexity (invoice parsing), no annotations, and the presence of an output schema (which means return values don't need explanation), the description is complete. It covers purpose, behavioral traits, limitations, and parameter semantics adequately for an AI agent to understand when and how to use this tool correctly.

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?

The input schema has 0% description coverage, so the description must compensate. It does this effectively by explaining the 'invoice' parameter: 'BOLT11 payment request string (starts with lnbc, lntb, or lnbcrt).' This adds crucial semantic context about the expected format and valid prefixes that the schema alone doesn't provide. For a single parameter tool, this is sufficient.

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 purpose: 'Decode a BOLT11 Lightning invoice without external dependencies.' It specifies the exact resource (BOLT11 invoice) and verb (decode), and distinguishes itself from siblings by focusing on invoice parsing rather than blockchain analysis or transaction processing.

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: for decoding BOLT11 invoices. It explicitly states what it does NOT do ('Does NOT verify the signature or parse tagged fields beyond basic extraction'), which helps differentiate it from more comprehensive verification tools. However, it doesn't name specific alternative tools or provide explicit 'when-not-to-use' guidance.

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/bjunjo/treasury-mcp'

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