Skip to main content
Glama

AgentLogic MCP Server

ln_decode

Decode a BOLT11 Lightning invoice: payment hash, destination public key, amount in sats when present, timestamp, expiry, and description or description-hash presence. Decoding is fully local to the API; malformed invoices return a clean error. Price: $0.002 USDC on Base via x402.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "invoice": "<invoice>"
    },
    "name": "ln_decode"
  }
}

Input Schema

NameRequiredDescriptionDefault
invoiceYesBOLT11 payment request (lnbc... mainnet or lntb... testnet).

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.1/5.0
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 does well: it discloses that decoding is local to the API (no upstream call), that malformed invoices return a clean error rather than throwing, and that the call costs $0.002 USDC on Base via x402. It does not spell out idempotency or auth/payment mechanics, but the operation's read-only nature is implicit and clear.

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 dense sentences: the first front-loads the operation and its outputs, the second covers behavioral guarantees and cost. No redundancy and nothing buried.

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?

No output schema exists, so the description compensates by enumerating the returned fields, and it also covers error behavior and pricing. For a one-parameter, annotation-free tool this is complete enough to call correctly.

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% and the single 'invoice' parameter is already documented as a BOLT11 payment request with mainnet/testnet prefixes. The description adds no format or syntax detail beyond that, 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 and resource ('Decode a BOLT11 Lightning invoice') and enumerates the exact fields returned: payment hash, destination pubkey, amount, timestamp, expiry, and description/hash. That is precise enough to separate it from the ln_node and ln_stats siblings without opening a schema.

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?

Usage is implied by the purpose — you call it when you hold a BOLT11 string — but there is no explicit when-to-use or when-not guidance, and no named alternative for related Lightning queries. Adequate but leaves the routing decision to inference.

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.