Post, draft, repeat or import journals
manual_journalManual journals as in Xero (round 599). action=post proposes journal (debits equal credits, tax included as amounts_are says); its release follows the owner's switches. action=draft saves it as a draft (out of balance allowed; draft_id changes one; nothing is booked); action=post with draft_id posts a draft. action=template saves it under name (template_id changes one); action=post or draft with template_id and no lines uses that template (Use template): its journal dated journal.date or today, journal.narration, reference and reverse_on taking the place of the template's; action=repeat saves a repeating journal: name, journal (no date), every (1 to 99), unit (week, month, quarter, year), start (the date it begins), end_date or times, post_mode (post or draft): on each date the journal dated that day is posted or saved as a draft (repeating_id changes one); action=pause, resume or delete with repeating_id, template_id or draft_id. action=import proposes many journals in one go (pre-booked journals): rows [{date, narration, reference, account, description, tax_rate, debit, credit, cost_centre, project}], or csv (the text of a CSV file), or document_id of an uploaded CSV or Excel file; rows with the same reference are one journal; with preview=true (the default) nothing is written and every row and journal says what is wrong; preview=false puts all forward as one proposal (as_drafts=true saves them as drafts), refused whole while anything is wrong. action=attach links document_id to the posted journal_id. idempotency_key (with action=post): the same key with another journal is refused; the same journal is booked once. journal: {date (YYYY-MM-DD), narration, reference, currency (ISO code like EUR; left out: the company's own; converted at the day's ECB rate when booked), amounts_are (inclusive, the default: amounts with a tax rate include the tax; or exclusive), reverse_on (an auto reversing date), narration_to_lines (true: a line without a description carries the narration), stocktake (true: the journal is the stock count of its date, a line on a stock account), lines: [{account (code or exact name), description, tax_rate (code or name; left out: No VAT, whatever the account's default rate; a rate adds or holds its VAT line), debit, credit, cost_centre, project}], document_ids (uploaded files, attached to the entry), no_receipt (where no receipt exists: the reason, kept as its own document)}
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": {
"action": "<action>"
},
"name": "manual_journal"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| csv | No | ||
| name | No | ||
| rows | No | ||
| unit | No | ||
| every | No | ||
| start | No | ||
| times | No | ||
| action | Yes | ||
| reason | No | ||
| company | No | ||
| journal | No | ||
| mapping | No | ||
| preview | No | ||
| draft_id | No | ||
| end_date | No | ||
| as_drafts | No | ||
| post_mode | No | ||
| journal_id | No | ||
| amounts_are | No | ||
| document_id | No | ||
| template_id | No | ||
| repeating_id | No | ||
| idempotency_key | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||