Skip to main content
Glama

Sats4AI - Bitcoin-Powered AI Tools

check_payment_status

Read-onlyIdempotent

Check whether a Lightning invoice has been paid. Returns JSON: { paid, serviceUsed, refundAllowed, readyToUse, next, state } — readyToUse=true means paid, not yet consumed, and no refund queued; next says what to do. state is unpaid, paid, delivered, held, refund-open, claimed or expired. held (with its appeal_url) is present while the payment is held for review. deliveryStatus and deliveryDetail are present for SMS and fax: a send that succeeded means accepted, not delivered, so poll for the carrier outcome. Call after create_payment to verify the user has paid before calling the target tool. Invoices expire after 10 minutes — if expired, create a new payment. Most MCP clients with a connected wallet pay instantly, so a single check is usually sufficient. This tool is free and does not require payment.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
paymentIdYesThe paymentId returned by create_payment

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.6/5.0
Behavior5/5

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

Annotations only declare readOnlyHint/idempotentHint; the description goes far beyond them by decoding the response contract (readyToUse meaning, 'next' guidance), enumerating the state machine (unpaid, paid, delivered, held, refund-open, claimed, expired), flagging the held/appeal_url condition, and warning that a successful SMS/fax send means 'accepted, not delivered' so the carrier outcome must be polled. It also states the cost profile (free, no payment required).

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?

Front-loaded with the core purpose, then structured as return-value decoding, then usage guidance. Dense but nearly every clause carries operational meaning; the JSON field enumeration runs a little long as a single run-on sentence, which keeps it short of perfect.

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 this tool's return values are complex and stateful, so the description must explain them — and it does, covering paid/readyToUse semantics, the full state enum, held-review behavior, and SMS/fax delivery caveats, plus expiry handling. Nothing needed to call or interpret it is 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?

Only one parameter with 100% schema description coverage ('The paymentId returned by create_payment'), so the schema already carries the load; the description adds no format, length, or syntax detail beyond it. Baseline 3 is appropriate when the schema fully documents the parameter.

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: 'Check whether a Lightning invoice has been paid.' It is immediately distinguishable from siblings like create_payment (initiates payment), await_result/check_job_status (polls non-payment work), and request_refund.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Gives explicit sequencing ('Call after create_payment to verify the user has paid before calling the target tool') and names the recovery path when the tool cannot help ('Invoices expire after 10 minutes — if expired, create a new payment'). It also pre-empts over-polling: 'Most MCP clients with a connected wallet pay instantly, so a single check is usually sufficient.'

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.