Skip to main content
Glama

recordInvoicePayment

Destructive

Record a payment the location received outside the platform (cash, bank transfer) against an issued invoice. Returns the invoice with the payment. Without amount it records the whole amount due and the invoice becomes paid; with amount, in major units, it records a partial payment. paymentDate is when the money arrived and defaults to now. This never charges the customer's card: to charge a saved payment method, issue the invoice with skipAutoCharge false. The route is not idempotent: after a failure or timeout, check the invoice's payments with getInvoice before calling again, or the payment is recorded twice. Get invoiceId from getInvoices. Never invent UUIDs; only use values from prior tool responses.

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": {
      "invoiceId": "<invoiceId>"
    },
    "name": "recordInvoicePayment"
  }
}

Input Schema

NameRequiredDescriptionDefault
amountNoPartial payment amount in major units.
invoiceIdYesThe id of the invoice.
paymentDateNoISO timestamp of when the money was received. Defaults to now. Must not be in the future.

Output Schema

NameRequiredDescriptionDefault
invoiceYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.4/5.0
Behavior3/5

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

Annotations already declare destructiveHint=true and readOnlyHint=false, but the description still adds real value: the non-idempotency warning with the double-record consequence and the retry procedure is behavior an agent cannot infer from annotations. It does not, however, say what specifically is destroyed or what permissions are required for a destructive mutation.

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 and dense with useful content, with each sentence carrying operational meaning. There is minor redundancy in the pairing of 'Get invoiceId from getInvoices' with the 'never invent UUIDs' sentence.

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?

Output schema exists, so return values need no elaboration, and the description still notes it returns the invoice with the payment. For a destructive, non-idempotent mutation, the retry guidance and ID sourcing cover everything an agent needs to call it correctly.

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 100%, so the baseline is 3, but the description goes beyond the schema by explaining the conditional outcome of omitting amount (records the full amount due and the invoice becomes paid) and by clarifying amount is in major units and paymentDate is when money arrived, defaulting to now.

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 ('Record a payment ... against an issued invoice') and immediately scopes it to money received outside the platform, which separates it from card-charging siblings like issueInvoice.

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 routing: use issueInvoice with skipAutoCharge false to charge a saved card, use getInvoices to obtain the invoiceId, use getInvoice to verify payments after a failure, and call only with UUIDs from prior responses. When-not-to-use and alternatives are both named.

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