create_gl_journal_entry
Create a draft journal entry by hand — accountant. It carries NO source document unless you name one.
Only the pipeline paths stamp source_ref_type/source_ref_id (an ingested
document is 'item'), so by default a booking made here cannot be traced back to
what justified it. document_id is the retrofit: name an existing gl_document
(create one with POST …/gl/documents) and it is attached as the entry's source
document, so the entry is not evidence-less. The same attach is available afterwards
at POST …/gl/journal-entries/{id}/documents — including on a posted entry.
Use it for bookings with genuinely no document behind them — reclassifications, provisions, accruals, year-end adjustments. Do not transcribe a document into it and then attach the file — that files the evidence beside a booking nobody derived from it. Each of these has a door that keeps the evidence attached:
an invoice, receipt or statement → ingest the file (
POST …/uploads/or…/intake), then accept what the coder proposes (…/autopost-decisions);an already-ingested item →
POST …/gl/items/{item_id}/coding;a bank movement with no document →
POST /bank-entries/{entry_id}/manual-coding;opening balances →
POST …/opening-entriesand post the proposal.
auto_reverse_date arms the entry as a one-shot accrual (ZCT-527): once posted, the
auto-reversal executor reverses it in full on/after that date. It must be after
posting_date (422 otherwise), and it can only be set while the entry is a draft —
on the create here or on the PUT replace.
Drafts do not touch the books until …/post. See doc/pipeline.md §"Accounting".
On this MCP surface a null argument means "not provided": it is dropped before the request is sent, exactly as if the field were omitted.
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>",
"period_id": "<period_id>",
"posting_date": "<posting_date>",
"lines": "<lines>"
},
"name": "create_gl_journal_entry"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| lines | Yes | ||
| currency | No | ||
| period_id | Yes | ||
| company_id | Yes | ||
| entry_type | No | manual | |
| description | No | ||
| document_id | No | ||
| posting_date | Yes | ||
| rebooks_entry_id | No | ||
| auto_reverse_date | No | ||
| customs_assessment | No |