Skip to main content
Glama

Taokeh MCP server

File a pending supplier-payment draft (human approves in Taokeh)

create_payment_draft

FILES A PENDING DRAFT ONLY — NOTHING CHANGES UNTIL A HUMAN REVIEWS AND APPROVES IT IN TAOKEH. File a SUPPLIER-PAYMENT draft ("we paid Ah Seng RM5,000 from Maybank on Tuesday against bills 12 and 14"). This does NOT post: only the owner's approval writes a real bank payment and settles the bills, and when it does, accounts payable and the bank move exactly as they would if the owner had matched the line in Banking. A payment settles an EXISTING supplier's open bills: resolve the supplier (resolve_vendor) and see what is owed (ap_aging, search_documents) first, then give EITHER a lump total (auto-allocated oldest-first) OR explicit per-bill allocations. PREFER purchaseId over reference in an allocation: a supplier's own bill number is NOT unique in Taokeh, so a reference that matches two open bills is refused naming both rather than guessed. MYR only — a foreign-currency bill is refused and routes to Banking → Match, which handles the exchange difference. A payment dated BEFORE a bill it pays is accepted — an advance to the supplier: it sits on the supplier's account until the bill's date and pays the bill that day; the answer says so in paidBeforeBill. Except an OPENING bill when the payment is dated on or before the accounting start date: that bill is what was still owed on the start date, so the money is already counted in it — explicit allocations naming one are refused at filing, and a lump total is never poured into one. Amounts are RINGGIT, the same figures ap_aging and search_documents show you — never sen, never a foreign figure converted by you. A CREDIT CARD can't be the paying account here: paying a supplier on a card is a spend that arrives on the card's own statement — import that statement instead. IF THIS COMPANY IMPORTS BANK STATEMENTS and the payment is already sitting on an imported line, do NOT file here — propose the allocation on that line with draft_bank_classification. Filing it here would put the same money in Taokeh twice, and the server refuses when it can see the imported line. The server re-derives the allocation against live outstanding at create AND at approval, so its figures are authoritative and a bill settled in the meantime makes the draft refuse rather than over-pay. A bill's outstanding is NET of the live debit notes raised against it (a RM 432 bill with a RM 363.13 debit note owes 68.87; ap_aging lists the note as its own negative row, so the supplier's total there is already net): a lump total auto-allocates into those net figures only. An explicit per-bill amount may go up to the bill's open amount BEFORE its debit notes — paying the whole bill is allowed, and the excess then stays on the debit note as the supplier's refundable credit — so propose the net figure unless the user says they paid the full bill. Set needsReview and add a SHORT reviewer note in notes (one or two sentences naming what to double-check — not lengthy reasoning) for any doubt. Filed it wrong? Use revise_draft (kind: 'payment') rather than filing a second one. If you have the payment proof (transfer slip, remittance advice), attach the original document you extracted from — the owner sees it beside the draft at review (s.82 record-keeping) and it lands on the settlement entry automatically on approval. Small files: attachmentBase64 + attachmentMediaType inline. Send attachmentBytes (the original file’s decoded size) with it so a truncated base64 is rejected instead of filed. Anything bigger: request_attachment_upload → PUT the bytes → pass the returned attachmentToken — unless your shell cannot reach taokeh.my (a sandboxed client behind a network allowlist), in which case inline it anyway, with attachmentBytes; never both.

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": {
      "paymentDate": "<paymentDate>"
    },
    "name": "create_payment_draft"
  }
}

Input Schema

NameRequiredDescriptionDefault
notesNoA SHORT reviewer note: one or two plain sentences, written in the reviewer's language, flagging what the human should double-check before approving — a smudged or ambiguous total, a supplier you weren't sure of, a judgment call you made. The reviewer reads this on a small approval card, so keep it brief and human. This is NOT a place to dump lengthy reasoning, your working, or boilerplate — just the one thing to check. Leave it empty when there is nothing to flag.
totalNoA lump ringgit amount to auto-allocate oldest-first across the supplier’s open bills. Give this OR explicit allocations — never both.
vendorNoThe supplier name, resolved with resolve_vendor first. A payment settles an EXISTING supplier's bills and can never create a supplier.
vendorIdNoThe resolved vendor id, instead of the name.
allocationsNoThe explicit per-bill split, at most 50 lines. Each amount is capped by the server at that bill’s live open amount before its debit notes.
needsReviewNo
paymentDateYes
printedTotalNoThe total printed on the payment advice, if any. Cross-check only — the server computes the real total and flags a mismatch on the approval screen.
bankAccountIdNoThe PAYING bank/cash account (from intake_contract(doc_type:'payment') → payingAccounts). Optional — omit it and the reviewer picks at approval. A credit-card account is refused by name.
attachmentBytesNoThe decoded byte size of the ORIGINAL file on disk — send it alongside attachmentBase64 and the server rejects a truncated paste instead of filing a corrupt file.
attachmentTokenNoThe token from request_attachment_upload, AFTER you have PUT the file bytes to its uploadUrl. Use this instead of attachmentBase64 for any real photo/PDF — it carries the file out-of-band (no base64 in this call). Mutually exclusive with attachmentBase64. The uploaded file rides the draft and lands on the settlement entry on approval, exactly as an inline one does.
attachmentBase64NoThe ORIGINAL payment proof (transfer slip / remittance advice) as base64 — SMALL files only (a few KB). For a real photo or multi-page PDF use request_attachment_upload instead (attachmentToken). Rides the draft and lands on the settlement entry on approval — no re-upload. A bad type/oversize file is rejected and NOTHING is filed.
attachmentSha256NoThe SHA-256 of the ORIGINAL file as 64 hex chars — optional second check alongside attachmentBase64, so corrupted bytes are rejected instead of filed.
attachmentFilenameNoOptional original filename for the attachment, e.g. transfer-slip.jpg.
attachmentMediaTypeNoThe attachment's MIME type, e.g. 'image/jpeg' or 'application/pdf'. Required when attachmentBase64 is given. It must match the file's bytes — a mismatch is refused and nothing is filed.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / properties / attachmentMediaType / description
      Previous value: -"The attachment's MIME type, e.g. 'image/jpeg' or 'application/pdf'. Required when attachmentBase64 is given."New value: +"The attachment's MIME type, e.g. 'image/jpeg' or 'application/pdf'. Required when attachmentBase64 is given. It must match the file's bytes — a mismatch is refused and nothing is filed."
  2. Changed1 schema field changed
    • changedInput schema / properties / allocations / description
      Previous value: -"The explicit per-bill split, at most 50 lines. Each amount is capped at that bill’s live outstanding by the server."New value: +"The explicit per-bill split, at most 50 lines. Each amount is capped by the server at that bill’s live open amount before its debit notes."
  3. Changed2 schema fields changed
    • changedInput schema / properties / allocations / description
      Previous value: -"The explicit per-bill split. Each amount is capped at that bill’s live outstanding by the server."New value: +"The explicit per-bill split, at most 50 lines. Each amount is capped at that bill’s live outstanding by the server."
    • addedInput schema / properties / allocations / maxItems
      Added value: +50
  4. Added

TDQS

A4.7/5.0
Behavior5/5

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

Annotations only declare a non-destructive, non-idempotent write; the description goes far beyond: the draft has no ledger effect until human approval, allocation is re-derived at create AND at approval, a bill settled in the meantime causes refusal rather than over-payment, credit-card accounts are refused by name, foreign currency is refused and routed to Banking → Match, opening-bill and pre-dated-payment semantics are spelled out, and ambiguity in `reference` is refused by naming both bills. This is unusually thorough behavioral disclosure that the annotations alone could not convey.

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 in the first sentence, which is correct, but the remaining block is ~600 words of dense all-caps prose with no paragraph or bullet structure, and the attachment paragraph repeats the schema's attachmentToken/attachmentBase64/attachmentBytes guidance almost verbatim. Much of it earns its place, but the wall-of-text format makes the per-bill-vs-lump and debit-note rules harder to extract than necessary.

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 15-parameter mutation tool with no output schema, the description covers the full decision surface an agent needs: sourcing the supplier and bills, allocation strategy, currency, date-before-bill behavior, opening-bill edge case, debit-note netting, review-note discipline, attachment pathway selection, and the response field `paidBeforeBill`. Nothing material is left unaddressed.

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 already 87%, yet the description still adds real meaning: lump `total` auto-allocates oldest-first while explicit `allocations` cap at the bill's open amount before debit notes, prefer `purchaseId` over `reference` because bill numbers are not unique, amounts are ringgit never sen, and `attachmentBase64`/`attachmentToken` are mutually exclusive with a sandbox fallback. It stops short of 5 only because the attachment paragraph largely restates what the schema property descriptions already say.

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 (file a pending supplier-payment draft) and immediately scopes it: 'FILES A PENDING DRAFT ONLY — NOTHING CHANGES UNTIL A HUMAN REVIEWS AND APPROVES IT IN TAOKEH.' It also names what it is not (not a posting, not the path for imported bank lines) and gives a concrete example payload, so it is distinguishable from create_bank_clearing_draft and draft_bank_classification at a glance.

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?

Explicit when-to-use with prerequisites ('resolve the supplier (resolve_vendor) and see what is owed (ap_aging, search_documents) first'), explicit when-NOT-to-use ('IF THIS COMPANY IMPORTS BANK STATEMENTS and the payment is already sitting on an imported line, do NOT file here — propose the allocation on that line with draft_bank_classification'), and an error-recovery alternative (revise_draft kind:'payment'). 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