Skip to main content
Glama

Taokeh MCP server

Search journal entries

search_journal
Read-only

Search the general ledger's JOURNAL ENTRIES — every posting, whatever door 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 + name, debit, credit, line description), so you can see exactly HOW something was booked, not just that it exists. Filter by any combination of: date range, text (case-insensitive, matched against the entry memo AND its line descriptions), accountCode (entries touching that account), source (the door that created it), and an amount range on the entry's total debits. Give at least one filter — this never dumps the whole ledger. Newest first, capped, with a more flag. Pairs with search_expenses for reconciling: search_expenses shows what the /expenses register holds, search_journal shows every ledger entry including journal-era postings the register never covered. Read-only — it changes nothing.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
toNo
refNoNOT a filter on this tool. A journal entry has no reference field — search its memo and line descriptions with `text`.
fromNo
memoNoNOT a filter on this tool. Pass memo text as `text` (it matches the entry memo AND every line description).
textNoPartial text matched against the entry memo AND its line descriptions (case-insensitive contains).
partyNoNOT a filter on this tool. The ledger has no party column — search the name as `text`, or find the document with search_documents.
refNoNoNOT a filter on this tool. A journal entry has no reference field — search its memo and line descriptions with `text`.
numberNoNOT 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.
sourceNoThe door that 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.
accountNoNOT a filter on this tool. Pass the chart-of-accounts code as `accountCode` (exact).
maxAmountNoMaximum entry size, measured on the entry's total debits (MYR).
minAmountNoMinimum entry size, measured on the entry's total debits (MYR).
referenceNoNOT a filter on this tool. A journal entry has no reference field — search its memo and line descriptions with `text`.
accountCodeNoRestrict to entries that have a line on this account code (exact).
descriptionNoNOT a filter on this tool. Pass the text as `text` (it matches the entry memo AND every line description).

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. Changed8 schema fields changed
    • addedInput schema / properties / account
      Added value: +{
      +  "description": "NOT a filter on this tool. Pass the chart-of-accounts code as `accountCode` (exact)."
      +}
    • addedInput schema / properties / description
      Added value: +{
      +  "description": "NOT a filter on this tool. Pass the text as `text` (it matches the entry memo AND every line description)."
      +}
    • addedInput schema / properties / memo
      Added value: +{
      +  "description": "NOT a filter on this tool. Pass memo text as `text` (it matches the entry memo AND every line description)."
      +}
    • addedInput schema / properties / number
      Added value: +{
      +  "description": "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."
      +}
    • addedInput schema / properties / party
      Added value: +{
      +  "description": "NOT a filter on this tool. The ledger has no party column — search the name as `text`, or find the document with search_documents."
      +}
    • addedInput schema / properties / ref
      Added value: +{
      +  "description": "NOT a filter on this tool. A journal entry has no reference field — search its memo and line descriptions with `text`."
      +}
    • addedInput schema / properties / refNo
      Added value: +{
      +  "description": "NOT a filter on this tool. A journal entry has no reference field — search its memo and line descriptions with `text`."
      +}
    • addedInput schema / properties / reference
      Added value: +{
      +  "description": "NOT a filter on this tool. A journal entry has no reference field — search its memo and line descriptions with `text`."
      +}
  2. First observed

TDQS

A4.7/5.0
Behavior5/5

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

The description aligns with annotations (readOnlyHint=true, 'Read-only — it changes nothing') and adds substantial behavioral detail beyond them: it explains the return format (lines with account code/name, debit, credit, description), that it returns newest first with a cap and a `more` flag, and that it never returns the whole ledger without filters. This fully discloses the key behaviors.

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

Conciseness5/5

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

The description is detailed but every sentence earns its place: it opens with the purpose, then the return value, then filters, then the filter requirement, then order/cap/more, then the pairing, then read-only. It is well-structured, front-loaded, and avoids redundancy with the schema (e.g., it does not repeat the source enum list).

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

Completeness5/5

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

Given the tool's complexity (15 parameters, no output schema), the description covers all essential aspects: what it searches, what it returns, how to filter, the caution against dumping the whole ledger, ordering, pagination via `more`, and its relationship to sibling tools. It also leverages the schema's 'NOT a filter' hints to prevent misuse. Nothing critical is missing.

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 coverage is 87%, so the schema already documents most parameters. The description adds a summary of filter categories (date, text, accountCode, source, amount) and clarifies that `text` matches memo AND line descriptions—but the schema already states this. It confirms how amount range is measured (total debits), but again that is in the schema. The description does not significantly augment the schema beyond an organizational overview, so a baseline of 3 is appropriate.

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

Purpose5/5

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

The description states a specific verb ('Search') and a precise resource ('the general ledger's JOURNAL ENTRIES') and clearly distinguishes it from siblings by contrasting with search_expenses and search_documents. It also explains the return of balanced lines, so an agent can tell exactly what this tool does relative to others.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicitly states when to use ('Pairs with search_expenses for reconciling') and when not to ('This never dumps the whole ledger' implies filters required). It also lists concrete filter combinations and provides alternatives via 'NOT a filter' parameter hints, which guide the agent to `text` or `accountCode` instead. This gives clear context but could have stated explicit exclusions more directly.

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