Skip to main content
Glama

Invoice payment attempts

get_invoice_transactions
Read-onlyIdempotent

Every payment attempt on one invoice, oldest first, with its outcome and, when it failed, why (reason_code + reason): use it when a customer asks why a payment did not go through. Also the payments and refunds actually recorded. status: succeeded, failed, or pending. A pending SEPA direct debit (method sepa_direct_debit) means the debit request was sent to the customer's bank but the funds have not reached Hodi yet: that takes a few business days, the invoice is marked paid once they arrive, and nothing needs to be done meanwhile. A pending mobile money payment waits for the customer to approve it on their phone. origin: automatic (Hodi charged the saved card or mandate on the due date) or customer (the customer paid on the invoice page). reason_code no_payment_method = nothing saved to charge automatically: the customer pays from the invoice page or saves a card / sets up direct debit; technical_error = a fault on Hodi's side, not the customer's card or account: apologise, say it is not their fault, and suggest paying another way from the invoice page. Never suggest retrying a card that was refused for insufficient funds or blocked before the customer has checked with their bank.

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>"
    },
    "name": "get_invoice_transactions"
  }
}

Input Schema

NameRequiredDescriptionDefault
invoice_idYesInvoice id from list_invoices.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.4/5.0
Behavior5/5

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

Annotations only declare readOnly/idempotent/non-destructive; the description adds ordering (oldest first), the meaning of each pending state (SEPA debit waiting on the bank for a few business days, mobile money awaiting customer approval), what origin signifies, and how specific reason_codes should change the agent's advice. That is substantive behavior no structured field conveys.

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 what the tool returns and when to use it, and every clause carries information. The single dense paragraph mixes return-value semantics with support-tone instructions, which makes it harder to scan than a short bulleted structure would be.

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?

With no output schema, the description carries the full burden of explaining return values and does so: attempt list with outcome and reason, plus recorded payments and refunds, plus the enumerated status and origin values. An agent can interpret the response and act on it without further documentation.

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?

There is a single required parameter whose schema description is complete ('Invoice id from list_invoices.'), and the prose only implies that the call is scoped to one invoice. No additional syntax, format, or edge-case meaning is added, so the baseline of 3 applies.

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+resource+scope: 'Every payment attempt on one invoice, oldest first, with its outcome and, when it failed, why'. It also states what else is included ('the payments and refunds actually recorded'), which cleanly separates it from get_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?

Gives a concrete triggering situation: 'use it when a customer asks why a payment did not go through', plus downstream action guidance (apologise for technical_error, never suggest retrying a blocked card). It never names get_invoice as the alternative for invoice-level questions, so routing is clear but not fully enumerated.

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