Skip to main content
Glama

Taokeh MCP server

File a pending correction draft for a posted credit note (human approves in Taokeh)

update_credit_note_draft

FILES A PENDING DRAFT ONLY — NOTHING CHANGES UNTIL A HUMAN REVIEWS AND APPROVES IT IN TAOKEH. Propose a correction to a SALES CREDIT NOTE already posted in Taokeh — the door for a credit note that went onto the books with a wrong line, quantity, price, date or reason. An ADMIN reviews it as a DIFF (current → proposed) and approves; only that tap re-books the note, and it keeps the SAME credit-note number, the invoice it credits and any attached document. Pass creditNoteId, the note's REAL id from search_documents (docType credit_note) — a credit-note number is refused. ROUTING — three different mistakes, three different doors. (1) THE CREDIT NEVER SHOULD HAVE EXISTED (keyed twice, wrong customer, raised against the wrong invoice): the owner VOIDS it — Credit notes → the note → Void, in Taokeh; voiding keeps the note on the register marked VOID, and there is deliberately no AI lane for it. (2) THE CREDIT IS RIGHT BUT TYPED WRONG: THIS tool. (3) SOMETHING NEW HAPPENED LATER (more goods came back, a further allowance was agreed): a NEW credit note with create_credit_note_draft — a later event is its own document, not a rewrite of this one. WHAT YOU CAN CHANGE: cnDate, reason, and lines — the FULL REPLACEMENT SET (send every line the note should have, including the ones that were already right). ⛔ EVERY LINE MUST ANSWER goodsReturned (true = these goods physically came back into stock, false = money only). There is no default. Your answer only PRE-FILLS the admin's per-line question on the full review page — the admin's answer is what posts — and a ONE-TAP approval never moves stock: it is refused whenever the note already put goods back or any line says goods came back, so those corrections are approved on the review page. Leave taxCode out and the line inherits the note's own SST code for that product; a NEW product on a taxed note has nothing to inherit and is refused by name. WHAT YOU CANNOT, each refused by name: the CUSTOMER, the credit-note NUMBER, and the INVOICE it credits. THINGS THAT BLOCK AN EDIT OUTRIGHT, checked when you file (the server runs the real correction and rolls it back, so every refusal approval would give you is given NOW) and again when the admin taps: the note is voided; it is validated on MyInvois, exported for MyInvois, or submitted to LHDN (the owner voids it instead — the void clears the export and says what to do at MyInvois); a customer refund is allocated to it; the invoice it credits is gone or is not an invoice; its date is inside a LOCKED period; it put goods back under the company's previous stock setting; or the corrected note would credit more than the invoice has left, or put back more than the invoice shipped. A proposal that changes nothing is refused rather than filed. If the note is edited by someone else after you read it, the one-tap approval is refused — call revise_draft (kind 'credit_note_update') to re-read and re-propose.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
notesNoA SHORT reviewer note in the reviewer's language: what was wrong, what you changed, and — above all — whether the goods really came back.
proposedYesONLY what you want changed. An unknown or not-patchable key is refused by name.
needsReviewNoSet true when something gave you pause.
creditNoteIdYesREQUIRED — the posted credit note's real id, from search_documents (docType credit_note). A credit-note number is refused.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.7/5.0
Behavior5/5

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

Annotations are all false/absent, so the description carries the full burden — and it delivers: draft semantics ('NOTHING CHANGES UNTIL A HUMAN REVIEWS'), pre-fill-not-posting behavior, one-tap approval refused when goods-returned is involved, same number/invoice/doc preservation, validation-by-rollback at file time, full blocker list, and concurrency refusal. This is precisely the behavioral context an agent needs and would otherwise discover only through failed calls.

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?

Long but earns its length: routing, blockers, and refusal conditions are all actionable and non-redundant with the schema, and the scannable ALL-CAPS headers plus numbered list structure tames the density. The most critical fact — 'NOTHING CHANGES UNTIL A HUMAN REVIEWS' — is front-loaded. Minor redundancy exists ('admin's answer is what posts' restates the opening), so not a 5.

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

Completeness4/5

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

For a high-complexity tool with nested objects, a human approval gate, and no output schema, this is near-complete: it covers routing, blockers checked twice, concurrency, inheritance rules, and edge cases (no-change proposals refused, new product on taxed note). The only genuine gap is that it never states what the tool returns on successful filing, which matters more because there is no output schema.

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 baseline is 3; the description adds real value beyond the schema: lines as a FULL REPLACEMENT SET, forbidden keys (customer, number, invoice), taxCode inheritance behavior, and the no-default on goodsReturned. Deducted one point because much of the per-parameter detail (patterns, positivity, 'omit lines' note) already lives in the schema.

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 specific verb+resource: 'FILES A PENDING DRAFT ONLY' for a 'SALES CREDIT NOTE already posted in Taokeh', scoped to corrections for 'wrong line, quantity, price, date or reason'. Clearly distinguishes itself from the sibling create_credit_note_draft by the posted-vs-new-note boundary.

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 is exemplary: it enumerates three mistake types and maps each to a different door — void in Taokeh, this tool, or create_credit_note_draft — with explicit conditions ('THE CREDIT IS RIGHT BUT TYPED WRONG: THIS tool'). It also points to revise_draft for the concurrent-edit recovery path. Nothing is left 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