Skip to main content
Glama

Lightning Invoice Policy Check

lightning_invoice_policy
Read-onlyIdempotent

Check a Bitcoin mainnet BOLT11 invoice against the exact amount, expected payee public key and minimum time remaining before you approve payment. Paid per call. Price: 8 sats or US$0.008 (USDC) per call.

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_policy": "<invoice_policy>"
    },
    "name": "lightning_invoice_policy"
  }
}

Input Schema

NameRequiredDescriptionDefault
l402NoOptional. After paying the Lightning invoice: '<token>:<preimage>'.
passNoOptional. A Diamond budget token (dp_...) that your user approved once (from US$0.89; USDC or other Base tokens, or Lightning) or that you funded with the free diamond_budget tool. Each call deducts its price; no wallet needed in the agent.
pay_withNoOptional. 'lightning' requests a BOLT11 invoice and a token when Diamond can receive Lightning payments.
invoice_policyYesinvoice|expected_msat|min_remaining_seconds|payee_public_key. Seconds 0–86400. Enter the payee's 66-character Lightning public key.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.1/5.0
Behavior4/5

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

Annotations already establish read-only, idempotent, closed-world behavior. The description adds important commercial behavior not covered by annotations: the tool is paid per call and costs 8 sats or US$0.008. It does not describe the return result or failure behavior, which is a remaining 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 tightly written sentences; the policy purpose and the payment cost are both front-loaded with no filler or redundancy.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The description covers purpose and pricing but, with no output schema present, it never explains what the check returns (e.g., pass/fail, mismatch details). For a paid validation tool, that leaves an important behavioral gap.

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 all four parameters, including the encoded invoice_policy and payment fields, are documented in the schema. The description adds no parameter-level detail beyond restating the policy checks, so the baseline score of 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 description states a specific verb ('Check') and resource ('Bitcoin mainnet BOLT11 invoice') and names the exact policy dimensions validated: amount, payee public key, and minimum time remaining. This clearly distinguishes it from decode-oriented siblings such as lightning_decode_invoice.

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 phrase 'before you approve payment' gives clear contextual guidance on when to use it. It does not explicitly exclude other cases or name an alternative, but the intended usage is unambiguous.

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.

Resources