Skip to main content
Glama

pay_invoice

Destructive

Pay a BOLT11 Lightning invoice. Platform fee: 1% of the amount, rounded down, minimum 1 sat, reported as platform_fee_sats; get_info returns the current schedule. Returns the preimage as proof of payment. Works with an operator key (pays from the operator wallet; a default agent is provisioned automatically) or an agent key. If the response says pending:true the payment is still in flight: do NOT retry, check get_transactions instead.

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": "pay_invoice"
  }
}

Input Schema

NameRequiredDescriptionDefault
bolt11YesBOLT11 invoice string to pay (starts with lnbc...)
max_fee_satsNoMaximum routing fee in satoshis (backend default: 100 for agent keys, 10 for operator keys; unused reserve is refunded)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.4/5.0
Behavior5/5

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

Annotations already flag destructive/openWorld/non-idempotent, but the description adds context they cannot express: the 1% fee floor of 1 sat, where the fee is reported (platform_fee_sats), that get_info holds the live schedule, that success yields a preimage as proof, and that retrying a pending payment is dangerous. That last point is critical safety information for a destructive, non-idempotent payment call and goes well past the annotations.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The action is front-loaded in sentence one, and each subsequent sentence carries a distinct operational fact (cost, return value, key modes, pending handling). It is dense but coherent; the fee sentence is slightly overloaded by appending the get_info pointer, though nothing is truly redundant.

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?

There is no output schema, so the description must describe returns — and it does, naming preimage, platform_fee_sats, and the pending:true field that requires special handling. For a destructive, non-idempotent payment tool with only two parameters, the description covers cost, authorization modes, success proof, and the failure-retry hazard, leaving nothing an agent needs 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 coverage is 100%, and the schema itself documents bolt11's format and max_fee_sats including the per-key backend defaults and refund of unused reserve, so the description need not repeat it. The description contributes only indirect meaning (the platform fee is separate from the routing-fee cap) and adds no syntax or sizing guidance for either parameter. Baseline 3 is appropriate.

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 first sentence pairs a specific verb ('Pay') with a specific resource and format ('BOLT11 Lightning invoice'), which is exactly what separates this tool from pay_lightning_address and pay_l402_api in the sibling set. An agent can identify the right tool from the description alone without opening the schema.

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?

It gives clear conditional guidance: operator key pays from the operator wallet with an auto-provisioned default agent, agent key is the alternative, and a pending:true response has an explicit 'do NOT retry' rule routed to get_transactions. What it does not do is explicitly contrast itself with pay_lightning_address or pay_l402_api; the BOLT11 format constraint carries that distinction implicitly rather than stating it.

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.