Skip to main content
Glama

Update document payment

update_document_payment

Correct a payment ALREADY recorded against a document, identified by the payment id (not the document id); to record a new payment, use record_document_payment. Changes its amount, date or account on an invoice, quote, credit note or debit note.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idNoDocument id to record the payment against — a money-in document (invoice / recurring invoice / quote / debit note) or a money-out document (bill / purchase order / GRN / credit note). On update, the payment id.
dateNoDate the payment was received (ISO 8601).
nameNoLabel for this payment (e.g. "Deposit", "Final payment").
notesNoFree-text notes on the payment.
amountNoPayment amount in the payment's currency.
methodNoPayment method as free text (e.g. "cash", "card", "eft") — no fixed set.
paymentNoBank/ledger account id the money moved through — received into (money-in) or paid from (money-out) (see list_accounts).
categoryNoIncome category for the payment; defaults to Sales when omitted.
currencyNoISO 4217 currency code (e.g. "ZAR", "USD"). Defaults to the business currency.
responseidNoInternal: correlation id used to return the updated entity to the frontend; omit.
exchangerateNoManual FX rate to the business base currency; omit to use the stored/auto rate.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.3/5.0
Behavior3/5

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

Annotations declare readOnlyHint=false and destructiveHint=false, consistent with a non-destructive mutation, so the safety profile is covered elsewhere. The description adds the crucial id-disambiguation behavior, but says the change affects 'amount, date or account' while the schema exposes eleven optional fields, and it never states whether this is a partial update, whether omitted fields are preserved, or what permissions are needed.

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?

One front-loaded sentence carrying the core scope and disambiguation, plus a short second sentence on affected fields. Very little waste, though the second sentence's partial field list is slightly under-informative for an 11-parameter tool.

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 an all-optional mutation tool with full schema coverage and no output schema, the description supplies the routing and identity information an agent most needs. Remaining gaps (partial-update semantics, FX/currency interaction with exchangerate) are minor given the rich schema.

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 description coverage is 100%, so the baseline is 3, but the description adds real value by clarifying that the id parameter means the payment id on update (the schema text itself is ambiguous, mixing document-on-create and payment-on-update semantics). It does not otherwise enrich the remaining parameters.

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 ('Correct a payment ALREADY recorded against a document') and pins down the identity of the target ('payment id, not the document id'). It also names the sibling it is not (record_document_payment), so an agent can distinguish the two without opening either schema.

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?

Explicitly gives the when-to-use condition (payment already recorded, correct it) and names the alternative with its triggering condition ('to record a new payment, use record_document_payment'). No inference is required to route between the two tools.

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