Skip to main content
Glama

Record statement balance

record-statement-balance
DestructiveIdempotent

Record the ending balance of a statement (a bank, card or loan statement) for one balance-sheet account, and reconcile the account to it. Give the balance as the statement shows it, as a positive number in the account's normal direction, with the statement's ending date. The ledger's balance at that date is set beside it, counting the drafts the close will post, and the result is recorded on the account's statement reconciliation for the period the statement ends in. On an account a bank feed keeps, ledger lines that did not come from the feed and are dated on or before the statement are listed as outstanding and adjust the statement balance, since the bank had not cleared them; one dated before the statement's own cycle is listed as stale_outstanding and does not, since the bank should have cleared it by now, so the difference stays until it clears, is voided or is re-dated; a statement ending before the period's last day is carried to it by the feed's own lines (roll_forward). Attach the statement as evidence by passing the document_id of its stored file (create-document-upload, then complete-document-upload); recording it again with another document lapses a sign-off, and recording it again without one keeps the document already attached (an empty string detaches it). Writes no books. The first statement recorded for an account creates its reconciliation, which does not hold the close: turn required_for_close on with set-reconciliation-policy to make every period's close wait for a statement on that account. Recording the same account and date again replaces the earlier balance; when more than one statement ends in a period, the one with the latest date stands. Recording a balance that differs from one already signed off lapses that sign-off. A difference left after the outstanding lines is activity one side has and the other does not yet, or an error on either. Returns the reconciliation's standing for the period.

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": {
      "element_id": "<element_id>",
      "as_of": "<as_of>",
      "balance": "<balance>"
    },
    "name": "record-statement-balance"
  }
}

Input Schema

NameRequiredDescriptionDefault
noteNoAnything worth keeping with the recorded balance.
as_ofYesThe statement's ending date.
balanceYesThe ending balance as the statement shows it, as a positive number in the account's normal direction: money in a bank account, or the amount owed on a loan or a card. Negative for the opposite, such as an overdrawn bank account.
entity_idNoThe entity whose books the account is in, by id. Omit for the group parent. The account must be in that entity's chart.
element_idYesThe balance-sheet account the statement is for (a chart-of-accounts element id).
document_idNoThe statement itself, as a document already added with create-document. Kept on the record as evidence. Recording the same account and date again keeps the earlier record's document when this is omitted; an empty string drops it.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.5/5.0
Behavior5/5

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

Annotations already flag a destructive, non-read-only, idempotent write, and the description goes well beyond them: 'Writes no books', re-recording the same account/date replaces the prior balance, re-recording with another document lapses a sign-off, an empty document_id detaches, and a differing signed-off balance lapses the sign-off. It also explains outstanding/stale_outstanding/roll_forward handling for feed-kept accounts, which is behavior no annotation conveys.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The purpose is front-loaded, but the body is one dense paragraph with long run-on sentences (the stale_outstanding and roll_forward clauses especially). Almost every clause carries real semantics, but the lack of structure makes the important idempotency and sign-off rules harder to extract than they should 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?

For a complex, destructive reconciliation tool with no output schema, the description covers the full lifecycle: creation of the reconciliation, sign-off lapse, document evidence, duplicate/latest-date precedence, and return value ('the reconciliation's standing for the period'). An agent has everything needed to invoke 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; the description adds meaning on top by explaining the balance sign convention (positive in the account's normal direction), the as_of semantics, and the document_id lifecycle including detach via empty string. Some of this restates the schema, but the re-record and detach rules extend it.

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 opening sentence states a specific verb and resource ('Record the ending balance of a statement... for one balance-sheet account, and reconcile the account to it') and scopes the statement types (bank, card, loan). It is clearly distinguishable from siblings like record-opening-balance and set-reconciliation-policy.

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 gives concrete operating context: use it to record a statement balance and reconcile, attach evidence via document_id after create-document-upload/complete-document-upload, and turn on required_for_close with set-reconciliation-policy if closes must wait. It does not explicitly state when NOT to use this versus record-opening-balance, so it falls just short of full routing guidance.

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.