Skip to main content
Glama

PrivateByte

Pay an invoice from the wallet

pay_invoice

Pay one unpaid invoice from the account wallet. THIS SPENDS REAL MONEY: max_amount_minor is the most that may be taken (whole minor units). It takes the smaller of that, what the invoice owes and the wallet balance, so it can be a part payment. Needs a key with invoices:pay and billing:read.

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_id": "<invoice_id>",
      "max_amount_minor": "<max_amount_minor>",
      "request_id": "<request_id>"
    },
    "name": "pay_invoice"
  }
}

Input Schema

NameRequiredDescriptionDefault
invoice_idYes
request_idYesAn id you choose for this one action, 8 to 64 characters. Send the same id again when retrying, so nothing is done twice. Use a new id for a new action.
max_amount_minorYes

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?

Goes well beyond the annotations: it warns that real money is spent, explains the exact amount-selection rule (min of cap, amount owed, and wallet balance), discloses that partial payment is possible, and names the required key scopes (invoices:pay, billing:read). None of this is derivable from readOnlyHint=false / destructiveHint=false / openWorldHint=false.

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?

Three tight sentences, front-loaded with the action and immediately followed by the money-spending warning in caps. No filler or restatement of 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?

Covers auth requirements, amount semantics, and the partial-payment outcome for a 3-parameter mutation with no output schema. What is missing is what comes back on success (amount actually charged, remaining balance) and what happens when the invoice is already paid or funds are insufficient.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is only 33% (only request_id is documented inline), so the description must compensate, and it does for the highest-risk parameter: max_amount_minor is defined as an upper bound in whole minor units, not a fixed charge. invoice_id is left implicit, which is acceptable given how self-evident it is.

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 plus scope: 'Pay one unpaid invoice from the account wallet'. An agent can distinguish this from list_invoices or get_balance without inspecting 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?

Clear context for when to use it (one unpaid invoice, paid from wallet balance) and an important side note that the amount may be a part payment rather than the full invoice. It does not explicitly name an alternative tool or state when not to use this one, but the usage context 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