Skip to main content
Glama

Taokeh MCP server

Revise a pending draft

revise_draft

Correct a draft you already filed, instead of filing it again. Pass the draft's kind and id plus a patch of just the fields that were wrong — the server re-validates them exactly as it did at filing (same account rules, same date rules, same line derivation, same totals) and updates the draft in place. Use this whenever you realise a filed draft is wrong: for an expense, re-calling create_expense_draft with corrected fields is refused as a duplicate of the very draft you are trying to fix, and for every kind a second create files a CONFUSING SECOND DRAFT the human then has to notice and reject — revise the one you filed instead. ONLY a PENDING draft can be revised; a draft the user has already approved or rejected (or one that has expired) is refused, naming its status — file a fresh draft in that case. Fields you do not send are left exactly as filed. REVISING DOES NOT APPROVE ANYTHING: the draft stays pending, nothing posts, and the human still taps Approve in Taokeh — the same one-tap link from the original filing still works and shows the revised figures. The reviewer is TOLD it changed: a short 'revised by your AI' line naming the changed fields is appended to the note they read on the approval card, so add a plain-language note saying WHY you revised it.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
kindYesWhich kind of draft to amend — the same ten kinds the create_*_draft tools file. 'sales_debit_note' is the SELL-side debit note create_debit_note_draft files (an additional charge on an invoice you issued); 'journal' is the adjusting entry create_journal_draft files.
noteNoA SHORT plain-language reason for the revision, in the reviewer's language — 'the paid-from account should be the owner's capital account, not petty cash'. It is APPENDED to the note they already have (nothing is overwritten) and shows on the approval card. Keep it to a sentence.
patchYesOnly the fields you are correcting. Every key must belong to this draft kind — a misspelled or foreign key is refused rather than silently ignored. The card IMAGE of a contact draft and the original document riding any other draft are deliberately NOT patchable: they are the evidence the approver checks your fields against.
draftIdYesThe draftId the create_*_draft call returned.

Schema Changelog

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

  1. Changed2 schema fields changed
    • changedInput schema / properties / patch / properties / dueDate / description
      Previous value: -"invoice: the due date, YYYY-MM-DD, to state or correct one outright. Pass '' to drop your stated date and fall back to what the term derives (nothing, on a term Taokeh does not recognise — that invoice then posts due on its own issue date)."New value: +"invoice / bill: the due date, YYYY-MM-DD, to state or correct one outright. Pass '' to drop your stated date and fall back to what the term derives (nothing, on a term Taokeh does not recognise — that document then falls due on its own issue date)."
    • changedInput schema / properties / patch / properties / term / description
      Previous value: -"invoice / quote / purchase_order: the payment/delivery term line. On an invoice, the term as the paper states it — pass '' to clear it. Changing it to a PRESET term ('Due on Receipt', 'Net 7/14/30/60') also re-fills a due date Taokeh derived; a due date you stated yourself is left alone."New value: +"invoice / bill / quote / purchase_order: the payment/delivery term line. On an invoice, the term as the paper states it; on a BILL, the term the SUPPLIER printed — pass '' to clear it on either. Changing it to a PRESET term ('Due on Receipt', 'Net 7/14/30/60') also re-fills a due date Taokeh derived; a due date you stated yourself is left alone."
  2. Changed8 schema fields changed
    • changedInput schema / properties / kind / enum
      Previous value: -[
      -  "expense",
      -  "invoice",
      -  "bill",
      -  "quote",
      -  "receipt",
      -  "contact",
      -  "contact_update",
      -  "employee_update",
      -  "product_update",
      -  "recurring",
      -  "credit_note",
      -  "sales_debit_note",
      -  "purchase_order",
      -  "journal",
      -  "invoice_update"
      -]New value: +[
      +  "expense",
      +  "invoice",
      +  "bill",
      +  "quote",
      +  "receipt",
      +  "payment",
      +  "contact",
      +  "contact_update",
      +  "employee_update",
      +  "product_update",
      +  "recurring",
      +  "credit_note",
      +  "sales_debit_note",
      +  "purchase_order",
      +  "journal",
      +  "invoice_update"
      +]
    • changedInput schema / properties / patch / properties / allocations / description
      Previous value: -"receipt: the REPLACEMENT per-invoice split. Re-clamped against the customer's LIVE open invoices."New value: +"receipt: the REPLACEMENT per-invoice split (saleId or reference), re-clamped against the customer's LIVE open invoices. payment: the REPLACEMENT per-bill split (purchaseId or reference), re-clamped against the supplier's LIVE open bills."
    • addedInput schema / properties / patch / properties / allocations / items / properties / purchaseId
      Added value: +{
      +  "type": "string"
      +}
    • changedInput schema / properties / patch / properties / bankAccountId / description
      Previous value: -"receipt: the suggested receiving bank/cash account; null clears the suggestion."New value: +"receipt: the suggested receiving bank/cash account. payment: the suggested PAYING bank/cash account (never a credit card). null clears the suggestion."
    • addedInput schema / properties / patch / properties / paymentDate
      Added value: +{
      +  "description": "payment: the date the money left the account.",
      +  "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
      +  "type": "string"
      +}
    • changedInput schema / properties / patch / properties / total / description
      Previous value: -"receipt: a lump sum to re-auto-allocate oldest-first across the open invoices (instead of allocations)."New value: +"receipt / payment: a lump sum to re-auto-allocate oldest-first across the open invoices / bills (instead of allocations)."
    • changedInput schema / properties / patch / properties / vendor / description
      Previous value: -"bill / purchase_order: the supplier name to re-resolve."New value: +"bill / purchase_order / payment: the supplier name to re-resolve."
    • changedInput schema / properties / patch / properties / vendorId / description
      Previous value: -"bill / purchase_order: the resolved vendor id."New value: +"bill / purchase_order / payment: the resolved vendor id."
  3. Changed4 schema fields changed
    • addedInput schema / properties / patch / properties / dueDate
      Added value: +{
      +  "anyOf": [
      +    {
      +      "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
      +      "type": "string"
      +    },
      +    {
      +      "const": "",
      +      "type": "string"
      +    }
      +  ],
      +  "description": "invoice: the due date, YYYY-MM-DD, to state or correct one outright. Pass '' to drop your stated date and fall back to what the term derives (nothing, on a term Taokeh does not recognise — that invoice then posts due on its own issue date)."
      +}
    • addedInput schema / properties / patch / properties / refNo
      Added value: +{
      +  "description": "invoice: the CUSTOMER's own DO / PO number as printed. Not the invoice number (that is `reference`). Pass '' to clear it.",
      +  "maxLength": 200,
      +  "type": "string"
      +}
    • changedInput schema / properties / patch / properties / term / description
      Previous value: -"quote / purchase_order: the payment/delivery term line."New value: +"invoice / quote / purchase_order: the payment/delivery term line. On an invoice, the term as the paper states it — pass '' to clear it. Changing it to a PRESET term ('Due on Receipt', 'Net 7/14/30/60') also re-fills a due date Taokeh derived; a due date you stated yourself is left alone."
    • addedInput schema / properties / patch / properties / term / maxLength
      Added value: +100
  4. Changed2 schema fields changed
    • changedInput schema / properties / kind / enum
      Previous value: -[
      -  "expense",
      -  "invoice",
      -  "bill",
      -  "quote",
      -  "receipt",
      -  "contact",
      -  "contact_update",
      -  "employee_update",
      -  "product_update",
      -  "recurring",
      -  "credit_note",
      -  "sales_debit_note",
      -  "purchase_order",
      -  "journal"
      -]New value: +[
      +  "expense",
      +  "invoice",
      +  "bill",
      +  "quote",
      +  "receipt",
      +  "contact",
      +  "contact_update",
      +  "employee_update",
      +  "product_update",
      +  "recurring",
      +  "credit_note",
      +  "sales_debit_note",
      +  "purchase_order",
      +  "journal",
      +  "invoice_update"
      +]
    • changedInput schema / properties / patch / properties / proposed / description
      Previous value: -"contact_update: the field changes, REPLACING the previous proposal entirely."New value: +"contact_update / invoice_update: the changes, REPLACING the previous proposal entirely. On an invoice_update that includes `lines` — send every line the invoice should have, not only the corrected one."
  5. Changed1 schema field changed
    • changedInput schema / properties / kind / enum
      Previous value: -[
      -  "expense",
      -  "invoice",
      -  "bill",
      -  "quote",
      -  "receipt",
      -  "contact",
      -  "contact_update",
      -  "credit_note",
      -  "sales_debit_note",
      -  "purchase_order",
      -  "journal"
      -]New value: +[
      +  "expense",
      +  "invoice",
      +  "bill",
      +  "quote",
      +  "receipt",
      +  "contact",
      +  "contact_update",
      +  "employee_update",
      +  "product_update",
      +  "recurring",
      +  "credit_note",
      +  "sales_debit_note",
      +  "purchase_order",
      +  "journal"
      +]
  6. Changed3 schema fields changed
    • changedInput schema / properties / kind / enum
      Previous value: -[
      -  "expense",
      -  "invoice",
      -  "bill",
      -  "quote",
      -  "receipt",
      -  "contact",
      -  "credit_note",
      -  "sales_debit_note",
      -  "purchase_order",
      -  "journal"
      -]New value: +[
      +  "expense",
      +  "invoice",
      +  "bill",
      +  "quote",
      +  "receipt",
      +  "contact",
      +  "contact_update",
      +  "credit_note",
      +  "sales_debit_note",
      +  "purchase_order",
      +  "journal"
      +]
    • addedInput schema / properties / patch / properties / persons
      Added value: +{
      +  "description": "contact_update: the contact-person changes, REPLACING the previous set entirely.",
      +  "items": {
      +    "additionalProperties": {},
      +    "propertyNames": {
      +      "type": "string"
      +    },
      +    "type": "object"
      +  },
      +  "type": "array"
      +}
    • addedInput schema / properties / patch / properties / proposed
      Added value: +{
      +  "additionalProperties": {},
      +  "description": "contact_update: the field changes, REPLACING the previous proposal entirely.",
      +  "propertyNames": {
      +    "type": "string"
      +  },
      +  "type": "object"
      +}
  7. Changed5 schema fields changed
    • changedInput schema / properties / kind / description
      Previous value: -"Which kind of draft to amend — the same nine kinds the create_*_draft tools file. 'sales_debit_note' is the SELL-side debit note create_debit_note_draft files (an additional charge on an invoice you issued)."New value: +"Which kind of draft to amend — the same ten kinds the create_*_draft tools file. 'sales_debit_note' is the SELL-side debit note create_debit_note_draft files (an additional charge on an invoice you issued); 'journal' is the adjusting entry create_journal_draft files."
    • changedInput schema / properties / kind / enum
      Previous value: -[
      -  "expense",
      -  "invoice",
      -  "bill",
      -  "quote",
      -  "receipt",
      -  "contact",
      -  "credit_note",
      -  "sales_debit_note",
      -  "purchase_order"
      -]New value: +[
      +  "expense",
      +  "invoice",
      +  "bill",
      +  "quote",
      +  "receipt",
      +  "contact",
      +  "credit_note",
      +  "sales_debit_note",
      +  "purchase_order",
      +  "journal"
      +]
    • addedInput schema / properties / patch / properties / clientTotal
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "number"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "description": "journal: your own read of the entry total (advisory, never used to compute); null clears it."
      +}
    • addedInput schema / properties / patch / properties / entryDate
      Added value: +{
      +  "description": "journal: the date the adjusting entry is dated.",
      +  "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
      +  "type": "string"
      +}
    • changedInput schema / properties / patch / properties / memo / description
      Previous value: -"expense: the memo."New value: +"expense / journal: the memo (for a journal it is what the entry is FOR — it prints on the entry)."
  8. Changed11 schema fields changed
    • changedInput schema / properties / kind / description
      Previous value: -"Which kind of draft to amend — the same eight kinds the create_*_draft tools file. 'sales_debit_note' is the SELL-side debit note create_debit_note_draft files (an additional charge on an invoice you issued)."New value: +"Which kind of draft to amend — the same nine kinds the create_*_draft tools file. 'sales_debit_note' is the SELL-side debit note create_debit_note_draft files (an additional charge on an invoice you issued)."
    • changedInput schema / properties / kind / enum
      Previous value: -[
      -  "expense",
      -  "invoice",
      -  "bill",
      -  "quote",
      -  "receipt",
      -  "contact",
      -  "credit_note",
      -  "sales_debit_note"
      -]New value: +[
      +  "expense",
      +  "invoice",
      +  "bill",
      +  "quote",
      +  "receipt",
      +  "contact",
      +  "credit_note",
      +  "sales_debit_note",
      +  "purchase_order"
      +]
    • changedInput schema / properties / patch / properties / confirmNewVendor / description
      Previous value: -"bill: only after the user confirmed the supplier is genuinely new."New value: +"bill / purchase_order: only after the user confirmed the supplier is genuinely new."
    • addedInput schema / properties / patch / properties / expectedDate
      Added value: +{
      +  "anyOf": [
      +    {
      +      "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "description": "purchase_order: when the goods are expected; null clears it."
      +}
    • changedInput schema / properties / patch / properties / lines / description
      Previous value: -"invoice / bill / quote / credit_note / sales_debit_note: the REPLACEMENT line set, in the same shape the matching create_*_draft takes. It replaces every line — send them all, not just the one you changed. The server re-derives every quantity and the grand total."New value: +"invoice / bill / quote / credit_note / sales_debit_note / purchase_order: the REPLACEMENT line set, in the same shape the matching create_*_draft takes. It replaces every line — send them all, not just the one you changed. The server re-derives every quantity and the grand total."
    • addedInput schema / properties / patch / properties / poDate
      Added value: +{
      +  "description": "purchase_order: the order date.",
      +  "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
      +  "type": "string"
      +}
    • changedInput schema / properties / patch / properties / printedTotal / description
      Previous value: -"invoice / bill / quote / receipt / credit_note / sales_debit_note: the total printed on the paper (cross-check only); null clears it."New value: +"invoice / bill / quote / receipt / credit_note / sales_debit_note / purchase_order: the total printed on the paper (cross-check only); null clears it."
    • changedInput schema / properties / patch / properties / reference / description
      Previous value: -"expense / invoice / bill / quote / credit_note / sales_debit_note: the document reference printed on the paper."New value: +"expense / invoice / bill / quote / credit_note / sales_debit_note / purchase_order: the document reference printed on the paper."
    • changedInput schema / properties / patch / properties / term / description
      Previous value: -"quote: the payment/delivery term line."New value: +"quote / purchase_order: the payment/delivery term line."
    • changedInput schema / properties / patch / properties / vendor / description
      Previous value: -"bill: the supplier name to re-resolve."New value: +"bill / purchase_order: the supplier name to re-resolve."
    • changedInput schema / properties / patch / properties / vendorId / description
      Previous value: -"bill: the resolved vendor id."New value: +"bill / purchase_order: the resolved vendor id."
  9. Changed7 schema fields changed
    • changedInput schema / properties / kind / description
      Previous value: -"Which kind of draft to amend — the same seven kinds the create_*_draft tools file."New value: +"Which kind of draft to amend — the same eight kinds the create_*_draft tools file. 'sales_debit_note' is the SELL-side debit note create_debit_note_draft files (an additional charge on an invoice you issued)."
    • changedInput schema / properties / kind / enum
      Previous value: -[
      -  "expense",
      -  "invoice",
      -  "bill",
      -  "quote",
      -  "receipt",
      -  "contact",
      -  "credit_note"
      -]New value: +[
      +  "expense",
      +  "invoice",
      +  "bill",
      +  "quote",
      +  "receipt",
      +  "contact",
      +  "credit_note",
      +  "sales_debit_note"
      +]
    • addedInput schema / properties / patch / properties / dnDate
      Added value: +{
      +  "description": "sales_debit_note: the debit-note date.",
      +  "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
      +  "type": "string"
      +}
    • changedInput schema / properties / patch / properties / lines / description
      Previous value: -"invoice / bill / quote / credit_note: the REPLACEMENT line set, in the same shape the matching create_*_draft takes. It replaces every line — send them all, not just the one you changed. The server re-derives every quantity and the grand total."New value: +"invoice / bill / quote / credit_note / sales_debit_note: the REPLACEMENT line set, in the same shape the matching create_*_draft takes. It replaces every line — send them all, not just the one you changed. The server re-derives every quantity and the grand total."
    • changedInput schema / properties / patch / properties / printedTotal / description
      Previous value: -"invoice / bill / quote / receipt / credit_note: the total printed on the paper (cross-check only); null clears it."New value: +"invoice / bill / quote / receipt / credit_note / sales_debit_note: the total printed on the paper (cross-check only); null clears it."
    • changedInput schema / properties / patch / properties / reason / description
      Previous value: -"credit_note: why the credit is given (it prints on the note)."New value: +"credit_note / sales_debit_note: why the credit or the additional charge is given (it prints on the note)."
    • changedInput schema / properties / patch / properties / reference / description
      Previous value: -"expense / invoice / bill / quote / credit_note: the document reference printed on the paper."New value: +"expense / invoice / bill / quote / credit_note / sales_debit_note: the document reference printed on the paper."
  10. Changed8 schema fields changed
    • changedInput schema / properties / kind / description
      Previous value: -"Which kind of draft to amend — the same six kinds the create_*_draft tools file."New value: +"Which kind of draft to amend — the same seven kinds the create_*_draft tools file."
    • changedInput schema / properties / kind / enum
      Previous value: -[
      -  "expense",
      -  "invoice",
      -  "bill",
      -  "quote",
      -  "receipt",
      -  "contact"
      -]New value: +[
      +  "expense",
      +  "invoice",
      +  "bill",
      +  "quote",
      +  "receipt",
      +  "contact",
      +  "credit_note"
      +]
    • addedInput schema / properties / patch / properties / cnDate
      Added value: +{
      +  "description": "credit_note: the credit-note date.",
      +  "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
      +  "type": "string"
      +}
    • addedInput schema / properties / patch / properties / goodsReturned
      Added value: +{
      +  "description": "credit_note: the ADVISORY hint that pre-ticks the reviewer's restock checkbox. It still never decides the stock movement.",
      +  "type": "boolean"
      +}
    • changedInput schema / properties / patch / properties / lines / description
      Previous value: -"invoice / bill / quote: the REPLACEMENT line set, in the same shape the matching create_*_draft takes. It replaces every line — send them all, not just the one you changed. The server re-derives every quantity and the grand total."New value: +"invoice / bill / quote / credit_note: the REPLACEMENT line set, in the same shape the matching create_*_draft takes. It replaces every line — send them all, not just the one you changed. The server re-derives every quantity and the grand total."
    • changedInput schema / properties / patch / properties / printedTotal / description
      Previous value: -"invoice / bill / quote / receipt: the total printed on the paper (cross-check only); null clears it."New value: +"invoice / bill / quote / receipt / credit_note: the total printed on the paper (cross-check only); null clears it."
    • addedInput schema / properties / patch / properties / reason
      Added value: +{
      +  "description": "credit_note: why the credit is given (it prints on the note).",
      +  "type": "string"
      +}
    • changedInput schema / properties / patch / properties / reference / description
      Previous value: -"expense / invoice / bill / quote: the document reference printed on the paper."New value: +"expense / invoice / bill / quote / credit_note: the document reference printed on the paper."
  11. First observed

TDQS

A4/5.0
Behavior5/5

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

The description details side effects: it updates in place, re-validates, appends a note to the approval card, and does not approve the draft. It also clarifies that the reviewer is told about the change and that the original document/image is not patchable. This goes well beyond the minimal annotations.

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 description is front-loaded with the main purpose and then provides detailed behavioral notes. It is somewhat verbose with repetitive emphasis (e.g., 'Fields you do not send...' and 'REVISING DOES NOT APPROVE ANYTHING'), but the structure is logical and information is well-organized.

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

Completeness3/5

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

The description thoroughly covers behavior, constraints, and side effects, but does not mention what the tool returns or the expected response format. Since there is no output schema, this is a notable absence. It also doesn't address errors or edge cases beyond refusing foreign keys, but that may be acceptable.

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?

The schema already provides 100% description coverage for every parameter, so the baseline is 3. The tool description adds some high-level guidance, such as 'patch of just the fields that were wrong' and 'every key must belong to this draft kind', but these largely restate schema details. No significant new parameter meaning is added.

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

Purpose4/5

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

The description opens with 'Correct a draft you already filed, instead of filing it again', clearly stating the action and target. It distinguishes from create_*_draft by explaining why re-calling create is refused, but it does not mention the update_*_draft sibling tools, leaving some ambiguity about tool selection.

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

Usage Guidelines4/5

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

The description explicitly says 'Use this whenever you realise a filed draft is wrong' and explains 'instead of filing it again', giving a clear condition. It also states that only a PENDING draft can be revised, which is an important constraint. However, it does not discuss the update_*_draft alternatives, so guidance is not fully exhaustive.

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