Skip to main content
Glama

payInvoice

payInvoice: Stage payment of an outstanding invoice from account balance. Requires authentication. Returns an actionId; present the summary to the user, then call executeConfirmedAction with the actionId if they approve.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
invoiceIdYesThe identifier of the outstanding invoice to pay, as returned by listInvoices.
sessionKeyNoSession key (osk_...) returned by checkDeviceLoginStatus. Pass it on every call when logged in via the in-chat device flow; omit when connected via OAuth.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedInput schema / properties / invoiceId / description
      Added value: +"The identifier of the outstanding invoice to pay, as returned by listInvoices."
  2. First observed

TDQS

A4.1/5.0
Behavior4/5

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

The description discloses the two-phase behavior: payInvoice stages the payment and returns an actionId, which must be confirmed via executeConfirmedAction. It also notes that authentication is required. This adds meaningful behavioral context beyond the annotations, though it does not explain side effects such as whether funds are reserved immediately.

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 description is compact and front-loaded with the core action. The 'payInvoice:' prefix is redundant with the tool name, and 'Requires authentication' is fairly generic, but the rest of the sentences are necessary and provide essential workflow guidance.

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?

For a mutating payment tool with no output schema, the description covers the essential flow: what it does, what it returns, and what the agent must do next. It may not enumerate all failure modes, but it gives the agent enough context to invoke the tool and continue the confirmation workflow correctly.

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?

The input schema already documents both invoiceId and sessionKey with full coverage. The description does not add parameter-level meaning beyond what the schema provides, 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 and resource: 'Stage payment of an outstanding invoice from account balance.' This clearly distinguishes it from merely creating a payment session and clarifies that it does not immediately finalize payment. The purpose is unambiguous and actionable.

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 description provides clear context: it is for outstanding invoices paid from account balance, and it requires an authentication state. It also gives follow-up usage instructions by telling the agent to present the summary and call executeConfirmedAction. It does not explicitly name alternative tools or exclusions, but the context is strong enough for correct selection.

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.