Skip to main content
Glama

Reclassify a posted ledger entry

reclassify_entry

Changes the ACCOUNT on an already-posted entry (from the general ledger) and nothing else — amount, currency, and date are facts pulled from the bank and cannot be edited here (there is no parameter for them). The entry's journal lines are rebuilt by relabelling the primary leg, preserving every amount and FX home-stamp, so it stays balanced. An audit_trail entry records who changed it from→to, and a ledger sync is re-queued. GUARDS (no bypass): the entry must be posted (not awaiting review — use approve_classification for that); a manual or multi-leg entry cannot be reclassified (correct it by reversal); and an entry in a CLOSED period is refused (reopen or post a prior-period adjustment). Set create_rule:true to ALSO teach a forward-only counterparty rule so future events from this counterparty book to the new account — past entries are NOT retroactively re-classified. actor_id is optional — it defaults to the organisation entity, and if provided must belong to this org.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
org_idNoOptional. Defaults to the organisation the authenticated API key is bound to, so you normally omit it and never need to ask the user for their organisation UUID. If provided, it must match the key’s org or the request is rejected.0e91146d-511c-469f-bdee-5c867b26ae0d
reasonYesWhy the new account is correct. Stored verbatim in the audit trail.
actor_idNoOptional. Defaults to the organisation entity (correct for an org-scoped key). If provided, it must be an entity belonging to this organisation — arbitrary UUIDs are rejected, so the audit trail cannot be attributed to someone else.
create_ruleNoAlso upsert a forward-only counterparty rule (this counterparty → the new account) so future events auto-classify. Does NOT re-classify past entries.
new_account_codeYesThe account to move this entry to: a numeric chart-of-accounts code (4000 SaaS Revenue, 4100 Usage Revenue, 4900 Other Income, 5000 API & Compute Costs, 5100 Payment Processing Fees, 5200 Platform Commission, 6100 Software Subscriptions, 6200 Contractor & Freelancer, 6300 Marketing & Ads, 6400 Banking & Finance Fees, 6500 Payroll, 6600 Taxes, 6700 Foreign Exchange Gain/Loss, 6750 Unrealized FX Gain/Loss, 6800 Office & Equipment, 6810 Travel, 6820 Meals & Entertainment, 6830 Professional Services, 6840 Insurance, 6900 Other Expenses, 2100 Accounts Payable, 3900 Owner Contributions & Transfers, 1100 Cash & Bank, 1150 Stripe Receivable, 1160 App Store / Play Receivable, 1200 Stripe Settlement) or a broad rollup category (revenue → 4000, cost_of_goods → 5000, operating_expense → 6100).
classified_event_idYesThe classified_event_id of the posted entry to reclassify.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
to_accountYes
from_accountYes
new_categoryYes
reclassifiedYes
ledger_sync_queuedYes
classified_event_idYes
counterparty_rule_idNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.7/5.0
Behavior5/5

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

The annotations only provide readOnlyHint=false, idempotentHint=false, destructiveHint=false. The description goes far beyond this by disclosing exactly what changes and what does not: amount/currency/date are immutable, journal lines are rebuilt by relabelling the primary leg, balances are preserved, an audit_trail entry is written, and a ledger sync is re-queued. It also states the guards and side effects of create_rule, giving full behavioral transparency.

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

Conciseness5/5

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

The description is dense but every sentence earns its place. It is front-loaded with the core purpose, then flows logically through invariants, guards, the create_rule option, and actor_id defaults. The uppercase 'GUARDS' label structures the constraints clearly, and there is no filler or redundancy.

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?

Given the complexity (6 parameters, multiple guards, side effects), the description is complete: it explains preconditions, failure modes, side effects (audit, ledger sync, rule creation), parameter defaults, and validation. The presence of an output schema means return-value details are not needed, and the description covers everything an agent needs to invoke this tool correctly.

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 baseline is 3. The description does not add significant parameter-level meaning beyond the schema; it reinforces that there are no parameters for amount/currency/date and restates create_rule's forward-only behavior, but the schema already documents defaults, validation, and the chart-of-accounts values. No new parameter semantics are introduced.

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 description names a specific verb and resource: 'Changes the ACCOUNT on an already-posted entry (from the general ledger) and nothing else.' This clearly differentiates it from siblings like approve_classification (which handles unreviewed entries) and create_counterparty_rule (which creates forward rules without editing entries).

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?

Provides explicit when-to-use and when-not-to-use guidance: 'the entry must be posted (not awaiting review — use approve_classification for that); a manual or multi-leg entry cannot be reclassified (correct it by reversal); and an entry in a CLOSED period is refused (reopen or post a prior-period adjustment).' It also clarifies create_rule's relationship to counterparty rules, so an agent can route correctly.

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