Skip to main content
Glama

Taokeh MCP server

File a pending quote-correction draft (human approves in Taokeh)

update_quote_draft

FILES A PENDING DRAFT ONLY — NOTHING CHANGES UNTIL A HUMAN REVIEWS AND APPROVES IT IN TAOKEH. Propose a correction to a QUOTE that already exists — a wrong price or quantity, a missing or extra line, the wrong date, validity, term or notes. An admin or bookkeeper reviews a plain current → proposed DIFF and approves. A quote posts nothing, so the correction touches no ledger, no stock and no e-invoice. ROUTING — (1) the quote should not exist at all: the owner voids it in Taokeh (Quotes → the quote → Void); there is no AI lane for voiding. (2) the quote is wrong and still OPEN: THIS tool. (3) the quote was already CONVERTED into an invoice or a delivery order: it is closed to edits — correct the document it became (update_invoice_draft or update_delivery_order_draft). A NEW quote is create_quote_draft. WHAT YOU CAN CHANGE: quoteDate, validUntil (null clears it), term, notes (null clears it) and lines. WHAT YOU CANNOT, each refused by name: the CUSTOMER (a quote to someone else is a different quote), the QUOTE NUMBER, the CURRENCY or exchange rate, and converting or voiding. ONLY AN OPEN QUOTE can be corrected — checked when you file and again when the reviewer taps. Leave a line's taxCode out and it inherits this quote's own SST code for its product — unless the quote carries that product under more than one code, when you must state it. A quote taxed at a whole-document rate (no SST codes on its lines) needs taxRate whenever its LINES change (see that field). WHAT HAPPENS ON APPROVAL: the document is updated IN PLACE — same id, same number — through the SAME update Taokeh's own Edit screen runs. Every field you leave out is carried across exactly as it stands (the party, the attention contact, the currency and its frozen exchange rate, the tax) and is never reset. LINES: lines is the FULL replacement set. READ THE LINES FIRST with search_document_lines — each row's lineNo is what a { keep: } entry refers to, and keep is how a line that is already right survives untouched (a measured line keeps its frozen unit and its rounding row). A changed or new line is written in full, in the create tool's line shape, and the server re-derives its quantity and amount. A proposal that changes nothing is refused rather than filed as an empty diff. STALE: if a person edits the document after you read it, the one-tap approval is refused and the reviewer is shown both versions — call revise_draft with this draft's kind to re-read and re-propose. Pass the document's REAL id from search_documents; a document number is refused. A line Taokeh converted from a per-foot or per-piece price prints in tons at a whole-ringgit rate under a note like "(150' @ RM 0.50/ft)" (older documents print "/feet"): send such a line in its FILED form — thickness, width, tally, unit 'feet' or 'pcs', the per-foot or per-piece price (on a purchase, the supplier's cost) and only the grade as the description, never the printed note. On a correction, a PURCHASE line may instead be sent back exactly as it stands on the document; a SELLING line sent back exactly as it stands is read back into its filed form only when its note's price reproduces it (otherwise keep it with { keep: } where offered, or correct the header only); any other line carrying the note follows the rule for a new line — a selling line read back only at its own tons and rate with no discount, a purchase line refused.

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": {
      "quoteId": "<quoteId>",
      "proposed": "<proposed>"
    },
    "name": "update_quote_draft"
  }
}

Input Schema

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

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • removedInput schema / properties / proposed / properties / lines / items / properties / discount / anyOf
      Removed value: -[
      -  {
      -    "type": "number"
      -  },
      -  {
      -    "type": "string"
      -  }
      -]
    • addedInput schema / properties / proposed / properties / lines / items / properties / discount / type
      Added value: +[
      +  "number",
      +  "string"
      +]
  2. Changed1 schema field changed
    • changedInput schema / properties / proposed / properties / lines / items / properties / keep / description
      Previous value: -"Keep an EXISTING line exactly as it stands: { keep: <lineNo> } and nothing else beside it — lineNo from search_document_lines. The stored line rides across VERBATIM (its frozen unit, its discount, its SST code) and, on a measured line, the engine's rounding row under it comes along automatically. Use this for every line that is already right. A line Taokeh converted from a per-foot or per-piece price prints in tons at a whole-ringgit rate under a note like \"(150' @ RM 0.50/feet)\": send such a line in its FILED form — thickness, width, tally, unit 'feet' or 'pcs', the per-foot or per-piece price (on a purchase, the supplier's cost) and only the grade as the description, never the printed note. On a correction, a PURCHASE line may instead be sent back exactly as it stands on the document; a SELLING line sent back exactly as it stands is read back into its filed form only when its note's price reproduces it (otherwise keep it with { keep: <lineNo> } where offered, or correct the header only); any other line carrying the note follows the rule for a new line — a selling line read back only at its own tons and rate with no discount, a purchase line refused."New value: +"Keep an EXISTING line exactly as it stands: { keep: <lineNo> } and nothing else beside it — lineNo from search_document_lines. The stored line rides across VERBATIM (its frozen unit, its discount, its SST code) and, on a measured line, the engine's rounding row under it comes along automatically. Use this for every line that is already right. A line Taokeh converted from a per-foot or per-piece price prints in tons at a whole-ringgit rate under a note like \"(150' @ RM 0.50/ft)\" (older documents print \"/feet\"): send such a line in its FILED form — thickness, width, tally, unit 'feet' or 'pcs', the per-foot or per-piece price (on a purchase, the supplier's cost) and only the grade as the description, never the printed note. On a correction, a PURCHASE line may instead be sent back exactly as it stands on the document; a SELLING line sent back exactly as it stands is read back into its filed form only when its note's price reproduces it (otherwise keep it with { keep: <lineNo> } where offered, or correct the header only); any other line carrying the note follows the rule for a new line — a selling line read back only at its own tons and rate with no discount, a purchase line refused."
  3. Changed1 schema field changed
    • changedInput schema / properties / proposed / properties / lines / items / properties / keep / description
      Previous value: -"Keep an EXISTING line exactly as it stands: { keep: <lineNo> } and nothing else beside it — lineNo from search_document_lines. The stored line rides across VERBATIM (its frozen unit, its discount, its SST code) and, on a measured line, the engine's rounding row under it comes along automatically. Use this for every line that is already right."New value: +"Keep an EXISTING line exactly as it stands: { keep: <lineNo> } and nothing else beside it — lineNo from search_document_lines. The stored line rides across VERBATIM (its frozen unit, its discount, its SST code) and, on a measured line, the engine's rounding row under it comes along automatically. Use this for every line that is already right. A line Taokeh converted from a per-foot or per-piece price prints in tons at a whole-ringgit rate under a note like \"(150' @ RM 0.50/feet)\": send such a line in its FILED form — thickness, width, tally, unit 'feet' or 'pcs', the per-foot or per-piece price (on a purchase, the supplier's cost) and only the grade as the description, never the printed note. On a correction, a PURCHASE line may instead be sent back exactly as it stands on the document; a SELLING line sent back exactly as it stands is read back into its filed form only when its note's price reproduces it (otherwise keep it with { keep: <lineNo> } where offered, or correct the header only); any other line carrying the note follows the rule for a new line — a selling line read back only at its own tons and rate with no discount, a purchase line refused."
  4. Changed1 schema field changed
    • changedInput schema / properties / proposed / properties / lines / items / properties / unitPrice / description
      Previous value: -"The selling price per unit, in the document's own currency."New value: +"The selling price per unit, in the document's own currency. Two decimals at most (whole sen, or whole cents in another currency); put a discount or tax in its own field, never folded into the price."
  5. Changed1 schema field changed
    • changedInput schema / properties / proposed / properties / lines / items / properties / tally / description
      Previous value: -"The piece tally (dimensional lines)."New value: +"The tally as pieces/length_ft pairs — '10/10 12/14' is 10 pieces of 10 ft and 12 of 14 ft — OR the total running feet like 400' when the paper gives no cut list. Never invent a cut list (no '1/400'). With thickness and width this is what the quantity is derived FROM. Every token must be a pieces/length pair — a tally with anything else in it (a grade word, a stray number, '=') is refused; put grade words in the description. A total-feet tally needs thickness and width (or a named size) to work out the tons, and has no pieces, so it cannot carry a per-piece price — both are refused."
  6. Added

TDQS

A4.8/5.0
Behavior5/5

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

Beyond the annotations, the description discloses that this files a pending draft only, that approval updates the document in place with the same id and number, and that omitted fields are carried across rather than reset. It also explains stale-document behavior, line replacement semantics, tax inheritance, refusal cases, and the need to re-propose with revise_draft.

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?

The definition is long, but it is front-loaded with the most important constraint — pending draft only — and uses clear sectioning for routing, mutable fields, approval behavior, lines, and stale handling. Some line-conversion detail is dense and repetitive with the schema, but nearly every sentence carries operational meaning for this complex mutation.

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, non-idempotent draft-filing tool with no output schema, the description is unusually complete: it covers approval flow, in-place update behavior, allowed and forbidden fields, line replacement, tax-rate handling, stale edits, and the correct id source. An agent has enough context to select the tool and prepare a valid proposal.

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 meaningful semantics: quoteId must be the real id from search_documents and not a document number, lines are a full replacement set using { keep: lineNo } for unchanged lines, and taxCode may be inherited or must be stated in specific cases. It does not explain every top-level field such as needsReview or printedTotal, but the schema covers those and the description materially improves the critical parameters.

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 and resource: it files a pending correction draft for an existing quote, and explicitly clarifies that nothing changes until human approval. It also distinguishes this from create_quote_draft, voiding, and correcting converted documents, so an agent can identify the tool without opening sibling 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?

It gives explicit routing: if the quote should not exist, the owner voids it in Taokeh; if it is wrong and still open, use this tool; if it was converted, correct the invoice or delivery order instead; if new, use create_quote_draft. It also names the conditions under which the tool refuses changes, such as non-open quotes and non-patchable fields.

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