Skip to main content
Glama

pay_invoice

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.5/5.0
Behavior5/5

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

With no annotations at all, the description carries the full behavioral burden and does so: it states the 1% fee with minimum and rounding, names the platform_fee_sats field, explains what the return value proves (preimage), covers both key modes including the auto-provisioned default agent, and warns about the non-idempotent pending state. That is unusually complete for a payment mutation.

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 purpose is front-loaded in the first clause, followed by fee, return value, auth modes, and the failure-mode warning, with no filler sentences. The fee sentence is dense but each clause conveys distinct operational information.

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, and the description compensates by naming the returned preimage, platform_fee_sats, and the pending:true marker, plus the recovery path. Combined with the fee and key-mode details, an agent has everything needed to call and interpret this tool.

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%, so the schema already fully documents bolt11 and max_fee_sats including backend fee defaults and refund of unused reserve. The description adds fee-schedule context but does not clarify either parameter beyond what the schema states, so the baseline 3 is correct.

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?

Opens with a specific verb and a precisely qualified resource: 'Pay a BOLT11 Lightning invoice.' The BOLT11 qualifier alone separates it from sibling tools like pay_lightning_address and keysend without requiring the agent to open any 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?

Gives clear operational conditions: use with an operator key or agent key, and explicitly states the when-not case for pending payments ('do NOT retry, check get_transactions instead'). It stops short of explicitly routing an agent to pay_lightning_address or keysend for non-invoice payments, relying on the BOLT11 qualifier to imply 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.