Skip to main content
Glama

Taokeh MCP server

File a pending correction draft for a posted bill (admin approves in Taokeh)

update_bill_draft

FILES A PENDING DRAFT ONLY — NOTHING CHANGES UNTIL A HUMAN REVIEWS AND APPROVES IT IN TAOKEH. Propose a correction to a supplier bill ALREADY POSTED in Taokeh — the door for a bill that went onto the books with a wrong line, a wrong quantity or cost, the wrong date, the wrong payment term or the wrong payment method. It files a pending DRAFT an ADMIN reviews as a DIFF (current → proposed) and approves; only that tap rewrites the bill, and it keeps the SAME bill number, the original attached document, and the link to the purchase order the bill was converted from. Pass purchaseId, the bill's REAL id from search_documents — a bill number is refused, because two suppliers can print the same number and correcting the wrong one is worse than asking. ROUTING — three different mistakes, three different doors. (1) THE PURCHASE NEVER HAPPENED (keyed twice, entered on the wrong company, the wrong supplier's bill): the owner VOIDS it — Purchasing → the bill → Void, in Taokeh. There is deliberately NO AI lane for voiding. Tell them where to click. (2) THE PURCHASE HAPPENED BUT THE BILL IS WRONG (a wrong line, quantity or unit cost, the wrong date, term, due date or payment method): THIS tool. (3) SOMETHING CHANGED AFTER THE PURCHASE (goods went back to the supplier, the supplier credited a price difference later): a DEBIT NOTE against the bill, which the owner raises in Taokeh (Purchasing → Debit notes) — a real event that belongs on the books as its own document. WHAT YOU CAN CHANGE: purchaseDate, paymentMethod ('CASH' paid on the spot, or 'CREDIT' on account), term (the supplier's payment term, stored as written — changing an on-account bill to one of the five presets, Due on Receipt / Net 7 / Net 14 / Net 30 / Net 60, re-derives the due date from the bill date unless you also send dueDate), dueDate (only when the due date ITSELF is wrong — correcting just the bill date already moves the due date by the same number of days), and lines — the FULL REPLACEMENT SET, so send every line the bill should have, including the ones that were already right. Everything you do NOT send is carried across exactly as the bill has it: the supplier, the currency and its frozen exchange rate, the location the goods were received into, the batch (lot) each line was received into, and each line's SST code. A replacement line of a product the bill already carries is received into the same batch as the original line of that product. WHAT YOU CANNOT, each refused by name: the SUPPLIER (a different supplier is a different document — the owner voids and re-enters); the BILL NUMBER (preserved across an edit; Taokeh's own Edit screen cannot change it either); the CURRENCY or the RATE (frozen at posting); and a bill posted with a whole-document tax rate instead of per-line SST codes (Taokeh does not store that rate, so a correction from here would drop the input tax — the owner corrects it on the app's Edit screen). WHAT BLOCKS AN EDIT OUTRIGHT, checked when you file and again when the admin taps, each refusal naming the real next step: the document is not a bill (an opening balance or a debit note has its own page); it is validated on MyInvois as a self-billed e-invoice; a live debit note has been raised against it; a payment has been allocated to it; or it is dated inside a period the company has locked. A proposal that changes nothing is refused rather than filed as an empty diff. If the bill is edited by someone else after you read it, the admin is shown BOTH versions and the one-tap approval is refused — that is by design; call revise_draft (kind 'bill_update') to re-read and re-propose. An edit in Taokeh re-books the bill under a NEW id with the same number: a pending draft FOLLOWS it, and calling this tool with the old id is refused with the new id named — re-read the bill before proposing against it.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
notesNoA SHORT reviewer note in the reviewer's language: what was wrong, what you changed, and anything they should double-check before they approve a rewrite of a posted bill.
proposedYesONLY what you want changed. An unknown or not-patchable key is refused by name; a proposal the bill already agrees with is refused rather than filed.
purchaseIdYesREQUIRED — the posted bill's real id, from search_documents. A bill number is refused: correcting the wrong document silently is worse than asking which one they mean.
needsReviewNoSet true when something gave you pause — it flags the draft for the reviewer.
printedTotalNoThe grand total the corrected bill should show, if the user told you one — cross-checked against the server's own derivation and flagged on the review screen.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / properties / proposed / properties / term / description
      Previous value: -"The SUPPLIER's payment term as it should read, stored as written (do not round a real term to the nearest familiar one). Pass null to clear it. Correcting the term does NOT move the due date; if the due date is wrong too, propose `dueDate` alongside it."New value: +"The SUPPLIER's payment term as it should read, stored as written (do not round a real term to the nearest familiar one). Pass null to clear it. On an ON-ACCOUNT bill, changing to one of the five preset terms re-derives the due date from the bill date (+ 0/7/14/30/60 days), shown to the reviewer before approval; an unrecognised term moves nothing. To change the term but KEEP the current due date, send `dueDate` alongside it — a stated dueDate always wins."
  2. Added

TDQS

A4.7/5.0
Behavior5/5

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

Annotations only say write, non-destructive, non-idempotent; the description goes far beyond that, disclosing that nothing changes until a human approves a diff, what fields are carried across unchanged, what is refused by name, the concurrent-edit dual-version behavior, and that a re-booking gives the bill a new id that the draft follows. This is exactly the behavioral context annotations cannot carry.

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

Conciseness3/5

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

The critical constraint is front-loaded, which is good, but the body is a very dense wall of text with heavy all-caps emphasis and some repetition. The complexity justifies length, yet it could be tightened substantially without losing edge-case coverage, so it is only adequate on conciseness.

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?

With no output schema and only lightweight annotations, the description carries the full load and does so completely: purpose, routing, permitted and forbidden changes, blocking conditions, conflict handling, and recovery steps are all covered. An agent has everything needed to invoke this correctly in a complex mutation workflow.

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 schema already documents each parameter, but the description adds material semantics the schema does not: unsent fields are carried across exactly, lines must be the full replacement set, replacement lines inherit the original batch, and purchaseId must be the real id rather than a bill number. It stops short of adding format or value guidance beyond what the schema already supplies, so it is a 4 rather than a 5.

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 opening states a specific verb and resource — it files a pending correction draft for a supplier bill already posted in Taokeh — and immediately scopes it against alternatives (voiding, debit notes, create_bill_draft, revise_draft). An agent can tell exactly what this tool does and where it sits among siblings without opening any schema.

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 section explicitly maps three distinct mistakes to three distinct paths (void in Taokeh, this tool, debit note), names the case with no AI lane, and lists the blockers that reject an edit outright. It also names revise_draft as the recovery path after a concurrent edit, so when-to-use and when-not-to-use are both stated rather than implied.

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