Search journal entries
search_journalSearches the general ledger's journal entries: every posting, whatever created it (a manual journal, a scanned receipt, an invoice, a bank row, a paid expense, payroll, depreciation). Returns each entry with its balanced lines (account code and name, debit, credit, line description), so it shows how something was booked. Filters, in any combination: date range, text (case-insensitive, matched against the entry memo and its line descriptions), accountCode (entries touching that account), source (what created it) and an amount range on the entry's total debits. At least one filter is required; the whole ledger is never returned in one call. Newest first, capped, with a more flag. search_expenses shows what the /expenses register holds; this shows every ledger entry, including journal-era postings the register never covered. Read-only.
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": "search_journal"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| to | No | ||
| ref | No | Not a filter on this tool. A journal entry has no reference field — search its memo and line descriptions with `text`. | |
| from | No | ||
| memo | No | Not a filter on this tool. Pass memo text as `text` (it matches the entry memo AND every line description). | |
| text | No | Partial text matched against the entry memo and its line descriptions (case-insensitive contains). | |
| party | No | Not a filter on this tool. The ledger has no party column — search the name as `text`, or find the document with search_documents. | |
| refNo | No | Not a filter on this tool. A journal entry has no reference field — search its memo and line descriptions with `text`. | |
| number | No | Not a filter on this tool. A journal entry has no document number — search its memo and line descriptions with `text`, or find the document itself with search_documents. | |
| source | No | What created the entry (exact, case-insensitive), one of: 'MANUAL', 'SALE', 'PURCHASE', 'ADJUSTMENT', 'BANK', 'CREDIT_NOTE', 'DEBIT_NOTE', 'PAYROLL', 'IMPORTED_SERVICE', 'FX_REVAL', 'DEPRECIATION', 'ASSET_DISPOSAL', 'EXPENSE', 'LOAN', 'REVENUE_RECOGNITION', 'ASSET_ACQUISITION', 'BANK_OPENING'. Omit for all. | |
| account | No | Not a filter on this tool. Pass the chart-of-accounts code as `accountCode` (exact). | |
| maxAmount | No | Maximum entry size, measured on the entry's total debits (MYR). | |
| minAmount | No | Minimum entry size, measured on the entry's total debits (MYR). | |
| reference | No | Not a filter on this tool. A journal entry has no reference field — search its memo and line descriptions with `text`. | |
| accountCode | No | Restrict to entries that have a line on this account code (exact). | |
| description | No | Not a filter on this tool. Pass the text as `text` (it matches the entry memo AND every line description). |