Skip to main content
Glama

decode_invoice

Read-onlyIdempotent

Decode a BOLT11 invoice without paying it. Returns amount, description, expiry, and destination. No API key required — works before registering.

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": {
      "bolt11": "<bolt11>"
    },
    "name": "decode_invoice"
  }
}

Input Schema

NameRequiredDescriptionDefault
bolt11YesBOLT11 invoice string to decode

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.2/5.0
Behavior4/5

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

Annotations already declare readOnlyHint, idempotentHint, and destructiveHint=false, so safety is covered; the description adds genuinely new operational context by stating no API key is needed and that it works before registration. It does not say what happens on a malformed invoice, which is the main remaining behavioral 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, front-loaded with the action and its key distinction, then the return shape and auth note. Nothing is redundant and no sentence merely restates the tool name.

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?

With no output schema, the description usefully enumerates the returned fields, and the auth note covers the setup question an agent would otherwise have to guess. The only missing piece is failure behavior for an invalid or expired invoice, which is minor for a read-only decoder.

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 single parameter is fully documented in the schema ('BOLT11 invoice string to decode'), so schema coverage is effectively 100%. The description adds no format, casing, or validation detail beyond that, which puts it at the baseline for schema-documented parameters.

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 invoice') and immediately scopes it with 'without paying it', which cleanly separates it from pay_invoice, create_invoice, and get_invoice_status. The enumerated return fields (amount, description, expiry, destination) further pin down what the operation produces.

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?

'without paying it' and 'works before registering' give concrete selection criteria: use this for inspection rather than settlement, and it is callable pre-auth. It never names pay_invoice as the alternative, so the agent must infer the contrast from the sibling name, but the context is otherwise clear.

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.