File adjusting journal draft
create_journal_draftFiles a pending adjusting journal entry: accruals, prepayments, depreciation, corrections, reclassifications, year-end adjustments and reversing entries. It does not post; approval in Taokeh posts it as a normal manual journal the owner can still delete. Field shapes and this company's chart of accounts: intake_contract(doc_type:'journal'). The entry balances to the sen or is refused with the difference named; each line has exactly one side; at least two lines. accountRef matches an account code or exact name: an unknown ref is refused, an ambiguous name returns the candidates, and no account is ever created (accounts are added in Taokeh). The connector never edits or deletes a posted entry; a wrong one is corrected by a reversing entry (same accounts and amounts, sides swapped) plus the correct entry, and search_journal finds the original. Lines on a control account (receivables, payables, inventory, SST control, opening-balance equity) are allowed, flagged, and approvable only on the full review page. A journal that would leave a posted owner withdrawal over-repaid is refused at approval; when the books already stand that way the draft is filed with ownerLoanRefusal and approvable only on the full review page. Lines on Contra Clearing (1016 in the default chart) or Refund Clearing are refused. Scope: a bill, sale, paid expense or customer payment carries party, SST and stock effects a journal skips, and is filed by create_bill_draft, create_invoice_draft, create_expense_draft or create_receipt_draft. A working paper can ride the draft: attachmentToken (from request_attachment_upload) or attachmentBase64 with attachmentMediaType and attachmentBytes, not both. A filed draft is amended by revise_draft (kind 'journal').
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": {
"entryDate": "<entryDate>",
"lines": "<lines>"
},
"name": "create_journal_draft"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| memo | No | What the entry is FOR, in one line — "accrue December electricity", "reverse the duplicated August rent". It prints on the entry and is the first thing the approver reads. | |
| lines | Yes | At least two lines. Debits equal credits to the sen, or the entry is refused with the difference named. Keys outside the line schema are refused by name and nothing is filed. | |
| notes | No | A short note for the reviewer (one or two sentences, shown at approval): which schedule the figure came from, which entry this reverses, why a control-account line is right. | |
| entryDate | Yes | ||
| reference | No | Your own reference for the adjustment, if there is one (a schedule number, a working-paper ref). | |
| clientTotal | No | Your own arithmetic for the entry total — carried onto the review screen for the human to compare against, never used to compute anything. | |
| needsReview | No | ||
| attachmentBytes | No | The decoded byte size of the original file on disk, with attachmentBase64. A truncated paste is rejected instead of filed. | |
| attachmentToken | No | The token from request_attachment_upload, once the file bytes have been PUT to its uploadUrl. Used instead of attachmentBase64, not with it. | |
| attachmentBase64 | No | The supporting working paper as base64, for small files; a large file travels as attachmentToken (request_attachment_upload). A file of a refused type or size is rejected and nothing is filed. | |
| attachmentSha256 | No | Optional SHA-256 of the original file (64 hex chars), checked with attachmentBase64 so corrupted bytes are rejected instead of filed. | |
| attachmentFilename | No | The original filename, for the reviewer. | |
| attachmentMediaType | No | The attachment's MIME type, e.g. 'application/pdf'. Required with attachmentBase64; it must match the file's bytes, or the call is refused and nothing is filed. |