Skip to main content
Glama

Octobooks

Rebook a line to another account

rebook_line
Destructive

Rebook one booked line to another account (round 468, feature 537): action=rebook with journal_line_id (a line of a journal entry), to_account (a code of the company's chart) and reason: the reversal of the line and the same amount, side and VAT on the new account go forward as one proposal, booked on its release (release; the owner's switches decide). action=undo with the pending_action_id of that rebooking: a rebooking still waiting is withdrawn; one already booked has its reversal proposed. action=reverse with journal_id, reason and optionally day (YYYY-MM-DD): the whole entry mirrored, dated day, by default the entry's own date (a manual journal dated a month end: the next day, as an accrual reverses). Round 601c, an entry Octobooks posted automatically (the digest lists them with basis and sentence): action=undo with journal_id proposes its reversal and resets the payee's precedent at once; action=change with journal_id and to_account rebooks it, with since=true (the default) also the earlier lines of that payee in open periods (Rebook since), in one proposal, and resets the precedent. Round 620, unmatch a bank line: action=unmatch with bank_line_id and reason: the entry booked from that line is reversed on its own date, proposed as one proposal; on release the match ends and the line is back on the Bank tab Reconcile, to be booked again. A line matched to an entry not booked from it (an invoice payment, a manual entry): only the match ends on release, the entry stays (round 633). Round 733, Find and fix (the web's Journal, Find and fix): action=find with filters {account, tax (a code, a name or none), amount_from, amount_to, contact, text (narration, description or reference), date_from, date_to} and page: the posted lines that match, 100 a page, each with line_id, entry, account, tax rate, amount, filed (in a filed VAT period) and locked; bank and VAT lines and reversed entries are left out. action=reclassify with journal_line_ids (at most 100), to_account and/or to_tax_rate (code, name or none) and reason: one batch, per line the line and its VAT reversed and booked again on the new account or at the new rate (the gross stays), dated as the line; a line in a filed VAT period goes into the next return as a correction (filed_note says where). action=undo with its pending_action_id takes the batch back. Round 865: action=narrate with journal_line_ids (or journal_id) and narration: the entries of those lines (manual journals, at most 100) get the new narration in one batch, each booked as an Edit (reversed, booked again under the new narration, same day). Round 965, Find and recode (the web's Account transactions): action=recode with journal_line_ids (the line of each row of Account transactions, at most 500; a bank account's line is recoded by the account it was booked to), to_account, to_tax_rate and/or to_contact, and preview=true: what it would do (lines, total, from and to, each line refused with the reason, lines in a filed VAT return); without preview one batch goes forward like reclassify, undone with action=undo and its pending_action_id. Nothing is deleted.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "rebook_line"
  }
}

Input Schema

NameRequiredDescriptionDefault
dayNo
pageNo
sinceNo
actionNorebook
reasonNo
companyNo
filtersNo
previewNo
narrationNo
journal_idNo
to_accountNo
to_contactNo
to_tax_rateNo
bank_line_idNo
journal_line_idNo
journal_line_idsNo
pending_action_idNo

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

B3.4/5.0
Behavior3/5

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

Rich behavioral detail is disclosed beyond annotations: the reversal-and-rebook proposal model, effect deferred to release, batch caps (100, 500), filed-VAT-period correction handling (filed_note), preview behavior, and round-specific exceptions (633, 601c, 620). This clearly exceeds what the destructiveHint/readOnlyHint annotations convey, so it is well above the annotation baseline, but the density and compressed phrasing leave some actions' side effects ambiguous.

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

Conciseness2/5

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

The definition is a dense wall of run-on sentences crammed with round numbers (468, 537, 601c, 733, 865, 965) and no bullets or headings to separate the ~9 actions. Information is present but poorly front-loaded and hard to scan, so structure and brevity are weak.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

An output schema exists, so return values need not be explained, but for a 17-param, 9-action mutation tool the description leaves gaps: the undocumented company param and the fuzzy boundaries between reclassify, recode, and change. It is substantial but not fully complete for the tool's complexity.

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 0% across 17 parameters, so the description must carry all meaning and largely does via prose: journal_line_id, to_account, reason, pending_action_id, journal_id, day, bank_line_id, filters keys, page, journal_line_ids, to_tax_rate, to_contact, preview, since, narration. However the "company" parameter is never mentioned and params are not explicitly tied to the action that requires them, so it only partly compensates.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The opening states a concrete verb and resource ("Rebook one booked line to another account") and the description then sub-scopes the tool's many modes (rebook, undo, reverse, unmatch, find, reclassify, narrate, recode) with feature references. It is specific rather than tautological, but the sprawl across ~9 actions makes the tool's single purpose harder to grasp than a focused tool would be.

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?

Extensive per-scenario routing is given: which action to use for a pending rebooking vs a booked one, when to use undo, and mappings to the web's "Find and fix" and "Account transactions" and to the unmatch flow. It lacks an explicit 'when not to use this / use sibling X instead' statement and no guidance on choosing between the closely-related reclassify/recode/change, so it falls short of 5.

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