Skip to main content
Glama

Update journal entry

update-journal-entry
DestructiveIdempotent

Update a draft journal entry, or re-tag any entry's flows or management dimensions. If line_items is provided, existing line items are replaced atomically, the new set must balance, and a line on a retired (is_active=false) account is refused. line_flows sets the cash flow row of the named lines in place, on a posted entry too, closed month included, since a flow moves no balance; the lines on the other side of the entry that were in step with it follow. line_dimensions sets the department, class, location or project members the named lines carry, in place, on a posted entry and a closed month too, since a dimension moves no balance either. Posted entries accept nothing else and are corrected via create-event-block(event_type='journal_entry_reversed').

Example tool call

This call uses example arguments supplied in the tool’s input schema.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "memo": "Corrected vendor reference",
      "entry_id": "ent_01HVF8T0M2YTAY3BBNRH0V0"
    },
    "name": "update-journal-entry"
  }
}

Input Schema

NameRequiredDescriptionDefault
memoNoNew entry-level memo.
typeNoNew entry type. `closing` should normally only be set by close-period.
entry_idYesThe draft entry to update.
line_flowsNoRe-tag lines in place: each named line takes its `flow_qname` (null clears it), and when every line on that side of the entry then carries one flow, the lines on the other side not named here follow when they were in step with it — untagged, or carrying the flow the named lines carried before — so the cash line and the account line agree; a line tagged differently on purpose keeps its tag. Allowed on a posted entry, closed month included, and the only change one accepts; recorded on the entry as `flow_retags`, with what each changed line carried before. Not combinable with `line_items`, which replaces the lines (set `flow_qname` on them).
line_itemsNoReplacement line items. Whole-list replacement (not patch). The new set must still balance (total_debit == total_credit). Omit to leave existing lines untouched.
posting_dateNoNew posting date.
line_dimensionsNoRe-tag lines' management dimensions in place: each named line carries exactly the members given (empty clears them). A dimension moves no balance, so this is allowed on a posted entry, closed month included; recorded on the entry as `dimension_retags`, with what each line carried before. Not combinable with `line_items` (set `dimension_ids` on the new lines).

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.2/5.0
Behavior4/5

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

Annotations already declare destructive=true, idempotent=true, readOnly=false; the description adds substantive behavior beyond that — atomic delete+insert replacement, the balance requirement, refusal of lines on retired (`is_active=false`) accounts, and that retags are recorded on the entry as `flow_retags`/`dimension_retags` with prior values. It stops short of describing the response payload or the failure mode for an unbalanced set beyond refusal.

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 scoping constraint is front-loaded correctly, but the body is unusually dense — long parentheticals ('posted entry too, closed month included') recur twice and the propagation rule is explained at schema-level depth, duplicating what the schema already says. It is informative but not tightly economical.

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 destructive mutation with no output schema and a 7-parameter nested payload, the description covers the critical decision surface: which fields are allowed on posted entries, what gets replaced versus patched, and how corrections should be routed. The main gap is return/response behavior, which no output schema documents either.

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?

Schema description coverage is 100%, so the schema already documents every parameter, and much of the prose here (whole-list replacement, balance, not combinable with `line_items`) restates schema text rather than adding new syntax or domain detail. The cross-parameter constraint about posted-entry allowances is the main added value, but it is largely mirrored in the schema's own `line_flows`/`line_dimensions` descriptions.

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 names a specific verb and resource ('Update a draft journal entry') and immediately delimits a second, narrower capability ('re-tag any entry's flows or management dimensions'). A reader can distinguish it from delete-journal-entry, list-journal-entries, and the reversal path without opening the 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?

It states explicitly that posted entries accept only `line_flows` and `line_dimensions`, that posted entries accept nothing else, and it names the correct alternative for corrections: `create-event-block(event_type='journal_entry_reversed')`. It also flags the mutual exclusivity with `line_items`.

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.