Skip to main content
Glama

Taokeh MCP server

File a pending correction draft for a posted paid expense (human approves in Taokeh)

update_expense_draft

FILES A PENDING DRAFT ONLY — NOTHING CHANGES UNTIL A HUMAN REVIEWS AND APPROVES IT IN TAOKEH. Propose a correction to a PAID EXPENSE already posted in Taokeh (an entry on the Expenses page — find its id with search_expenses). The owner or bookkeeper reviews it as a DIFF (current → proposed) and approves; only that tap re-books the entry, exactly as Expenses → Edit does, and the receipt already on it carries across. ROUTING — (1) THE EXPENSE NEVER HAPPENED (keyed twice, the wrong company's receipt): the owner DELETES it in Taokeh (Expenses → the expense → Delete); there is deliberately no AI lane for that. (2) IT HAPPENED BUT WAS KEYED WRONG (the date, the amount, the input SST, the category, the account it was paid from, the payee, the reference): THIS tool. (3) SOMETHING NEW HAPPENED LATER (a refund came back, a second payment was made): a new entry — create_expense_draft for a further payment, or a reversing journal via create_journal_draft for money that came back. WHAT YOU CAN CHANGE, sending ONLY what is wrong (everything you leave out is carried from the entry as it stands): date, amount (the gross ringgit paid), inputTax (the input SST inside that amount), debitAccountCode (the category) and creditAccountCode (paid from) — both from expense_accounts —, memo and reference. Ringgit only; the currency and the receipt are not changeable here. BLOCKED OUTRIGHT, checked when you file (the server runs the real correction and rolls it back) and again at approval: the entry is not a paid expense; its date is inside a LOCKED period (or your new date is); a category that is not a cost account; a paid-from account that cannot pay; or an entry split across more lines than the expense form can show. A proposal that changes nothing is refused. If the expense is edited after you read it, the one-tap approval is refused — call revise_draft (kind 'expense_update'). SHAREHOLDER'S LOAN: approve refuses a correction that would leave a posted owner withdrawal over-repaid (the loan in debit on some date) — or, for a sole proprietor or partnership, a date a manual journal reclassified no longer nil — and names them and the steps; when that is already so as the books stand, the reply says it (ownerLoanRefusal) and the one-tap approval holds back.

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": {
      "entryId": "<entryId>",
      "proposed": "<proposed>"
    },
    "name": "update_expense_draft"
  }
}

Input Schema

NameRequiredDescriptionDefault
notesNoA SHORT reviewer note: what was wrong and where the corrected figure came from.
entryIdYesREQUIRED — the paid expense's journal-entry id, from search_expenses.
proposedYesONLY what you want changed. An unknown or not-patchable key is refused by name.
needsReviewNoSet true when something gave you pause.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.8/5.0
Behavior5/5

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

Goes well beyond the annotations (which only say not-read-only, not-destructive, not-idempotent): it discloses the pending/human-approval gate, the pre-flight roll-back check, the enumerated blocked conditions (locked period, non-cost category, non-paying account, over-split entry), the no-op refusal, the stale-read refusal, and the shareholder's-loan / ownerLoanRefusal behavior. This is unusually rich mutation disclosure.

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

Conciseness4/5

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

Front-loaded with the critical caveat in caps and organized into routing, changeable-fields, blocked-conditions, and edge-case blocks. Dense and long, but nearly every sentence carries decision-relevant content; the capital-letter emphasis is heavy-handed but not wasted.

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?

For a complex nested mutation with no output schema, the description covers approval flow, what is patchable, refusal conditions, and the specific error signal (ownerLoanRefusal) an agent may receive. Nothing an agent needs to call this correctly or interpret a refusal is missing.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so the baseline is 3, but the description adds real patch semantics the schema does not: 'sending ONLY what is wrong (everything you leave out is carried from the entry as it stands)', the ringgit-only constraint, and that currency and receipt are not changeable here. It stops short of restating per-field syntax, which the schema already covers.

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?

States a precise verb and resource ('files a pending correction draft for a paid expense already posted') plus scope ('nothing changes until a human approves'). The routing section explicitly separates it from delete-in-Taokeh, create_expense_draft, create_journal_draft, and revise_draft, so an agent can pick it out of a large sibling set without opening schemas.

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?

The ROUTING block gives three explicit when-to-use cases with named alternatives (the expense never happened → delete in Taokeh; keyed wrong → this tool; something new happened later → create_expense_draft or create_journal_draft). It also names revise_draft (kind 'expense_update') for the stale-read case, leaving nothing to inference.

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