Skip to main content
Glama

reverse_gl_journal_entry

Storno a posted journal entry: post its mirror image (accountant role).

Nothing is deleted; the original stays, linked, and the reversal entry is returned. The only VAT-correct storno door — VAT postings, open items and what the document spawned are all unwound.

body.posting_date dates the reversal and decides its period; omitted, it reuses the original's. A closed-period entry needs one in an open period and a person: the reversal is booked there; the entry stays unchanged.

409 when: the entry is a reversal or already corrected; a payroll run holds it; the date falls in a filed VAT period; an open item still carries a live settlement; the target period is closed or sealed; or a closed-period entry cannot be corrected (the reason is named). A closed-period entry armed to reverse itself is left to the auto-reversal run (nightly, or POST …/gl/auto-reversals/run by a person): conflict.closedPeriodEntryAutoReverses.

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": {
      "company_id": "<company_id>",
      "entry_id": "<entry_id>"
    },
    "name": "reverse_gl_journal_entry"
  }
}

Input Schema

NameRequiredDescriptionDefault
bodyNo
entry_idYes
company_idYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.5/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does well: it states nothing is deleted, the original stays linked, the reversal entry is returned, and the caller needs the accountant role. The 409 list and the closed-period/auto-reversal carve-out are strong behavioral disclosures. It stops short of stating idempotency (calling twice) or what the returned reversal contains, which is why it is not a 5.

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 the action and its consequence, then parameters, then failure modes — a sensible order. The density is high and a few fragments ('a closed-period entry needs one in an open period and a person') read as terse shorthand, and the 'storno' jargon assumes domain familiarity, but almost every sentence earns its place.

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 mutation tool with no annotations and no output schema, the definition covers side effects, permissions, error conditions, and date semantics. The remaining gap is return detail: it says 'the reversal entry is returned' but does not describe that object, which matters more when no output schema exists.

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 0%, so the description must compensate, and it does for the only non-obvious field: body.posting_date dates the reversal, decides its period, and defaults to the original's date when omitted, including the closed-period variant that must fall in an open period. entry_id and company_id are left implicit, which is reasonable given they are self-evident identifiers.

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?

Names a specific verb and resource: 'Storno a posted journal entry: post its mirror image'. It also distinguishes itself from the sibling write tools by claiming to be 'The only VAT-correct storno door', so an agent can tell it apart from create_gl_journal_entry and post_gl_journal_entry without opening their schemas.

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?

Explicit when-to-use (correcting a posted entry, VAT postings, open items, spawned documents) and explicit when-not, enumerated as six 409 conditions. It also routes the agent to a concrete alternative for one case: a closed-period entry armed to auto-reverse is left to the nightly run or POST …/gl/auto-reversals/run.

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