Skip to main content
Glama

Taokeh MCP server

Replaced by its MCP Registry listing

This endpoint is listed in the official MCP Registry as mcp. If you published it, claim ownership there.

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

create_payment_draft

Files a pending supplier-payment draft ("we paid Ah Seng RM5,000 from Maybank on Tuesday against bills 12 and 14"), which raises its payment voucher. Only the owner's approval writes the bank payment and settles the bills, moving payables and the bank as a match in Banking would, and numbers the payment voucher (the next PV number, dated as the payment, naming who prepared and who approved it); until then it prints unnumbered, marked not yet approved (voucherPreviewUrl, opened in Taokeh). It settles an existing supplier's open bills (supplier from resolve_vendor; bills from ap_aging or search_documents), by a lump total (allocated oldest first) or per-bill allocations. A supplier's bill number is not unique, so a reference matching two open bills is refused naming both; purchaseId is exact. MYR only: a foreign-currency bill is refused (Banking → Match handles the exchange difference). Amounts are ringgit, as ap_aging shows them. A payment dated before a bill it pays is an advance that pays the bill on the bill's date (paidBeforeBill in the result); dated on or before the accounting start date, it never settles an opening bill. A credit card cannot be the paying account; card spending arrives on the card's own statement. A payment matching an imported bank line still awaiting review (the given bankAccountId, same amount, within 3 days) is filed but flagged for review, with a warning naming the line, as the same money would count twice; its allocation is proposed on that line by draft_bank_classification. Outstanding is net of live debit notes, and a lump total fills net figures; an explicit amount may reach the bill's open amount before debit notes, leaving the excess as the supplier's refundable credit. Allocation is re-derived at filing and at approval, so a bill settled meanwhile makes the draft refuse. A filed draft is changed with revise_draft (kind 'payment'). Payment proof rides the draft as on create_receipt_draft.

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 in the reviewer's language naming what to double-check before approving (a smudged total, an uncertain party, a judgment call). Shown on a small approval card; empty when nothing needs flagging.
totalNoA lump ringgit amount allocated oldest first across the supplier's open bills. Either this or `allocations`.
vendorNoThe supplier name, matched against existing suppliers (as resolve_vendor does). No supplier is created.
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 or cash account (intake_contract(doc_type:'payment') → payingAccounts). Optional; without it the reviewer picks at approval. A credit-card account is refused by name.
attachmentBytesNoDecoded byte size of the original file. Sent with attachmentBase64, it lets the server refuse a truncated paste instead of filing a corrupt file.
attachmentTokenNoThe token from request_attachment_upload, once the file bytes have been PUT to its uploadUrl; it carries a photo or PDF of any size without base64. Not combined with attachmentBase64. The file lands on the settlement entry on approval.
attachmentBase64NoThe original payment proof (transfer slip, remittance advice) as base64, for small files (a few KB); a photo or multi-page PDF goes through request_attachment_upload and `attachmentToken`. A bad type or oversize file is refused and nothing is filed.
attachmentSha256NoSHA-256 of the original file as 64 hex characters: an optional second integrity check on attachmentBase64.
attachmentFilenameNoOptional original filename for the attachment, e.g. transfer-slip.jpg.
attachmentMediaTypeNoThe attachment's media type, e.g. 'image/jpeg' or 'application/pdf'. Required with attachmentBase64; a type that does not match the file's bytes is refused and nothing is filed.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
  2. Changed10 schema fields changed
    • changedInput schema / properties / allocations / items / properties / purchaseId / description
      Previous value: -"The open bill id (from search_documents). Prefer this over reference — a supplier’s bill number is not unique here."New value: +"The open bill id (from search_documents). Exact, unlike reference: a supplier's bill number is not unique."
    • changedInput schema / properties / attachmentBase64 / description
      Previous value: -"The 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."New value: +"The original payment proof (transfer slip, remittance advice) as base64, for small files (a few KB); a photo or multi-page PDF goes through request_attachment_upload and `attachmentToken`. A bad type or oversize file is refused and nothing is filed."
    • changedInput schema / properties / attachmentBytes / description
      Previous value: -"The 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."New value: +"Decoded byte size of the original file. Sent with attachmentBase64, it lets the server refuse a truncated paste instead of filing a corrupt file."
    • changedInput schema / properties / attachmentMediaType / description
      Previous 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."New value: +"The attachment's media type, e.g. 'image/jpeg' or 'application/pdf'. Required with attachmentBase64; a type that does not match the file's bytes is refused and nothing is filed."
    • changedInput schema / properties / attachmentSha256 / description
      Previous value: -"The SHA-256 of the ORIGINAL file as 64 hex chars — optional second check alongside attachmentBase64, so corrupted bytes are rejected instead of filed."New value: +"SHA-256 of the original file as 64 hex characters: an optional second integrity check on attachmentBase64."
    • changedInput schema / properties / attachmentToken / description
      Previous value: -"The 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."New value: +"The token from request_attachment_upload, once the file bytes have been PUT to its uploadUrl; it carries a photo or PDF of any size without base64. Not combined with attachmentBase64. The file lands on the settlement entry on approval."
    • changedInput schema / properties / bankAccountId / description
      Previous value: -"The 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."New value: +"The paying bank or cash account (intake_contract(doc_type:'payment') → payingAccounts). Optional; without it the reviewer picks at approval. A credit-card account is refused by name."
    • changedInput schema / properties / notes / description
      Previous value: -"A 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."New value: +"A short reviewer note in the reviewer's language naming what to double-check before approving (a smudged total, an uncertain party, a judgment call). Shown on a small approval card; empty when nothing needs flagging."
    • changedInput schema / properties / total / description
      Previous value: -"A lump ringgit amount to auto-allocate oldest-first across the supplier’s open bills. Give this OR explicit allocations — never both."New value: +"A lump ringgit amount allocated oldest first across the supplier's open bills. Either this or `allocations`."
    • changedInput schema / properties / vendor / description
      Previous value: -"The supplier name, resolved with resolve_vendor first. A payment settles an EXISTING supplier's bills and can never create a supplier."New value: +"The supplier name, matched against existing suppliers (as resolve_vendor does). No supplier is created."
  3. 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."
  4. 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."
  5. 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
  6. Added

TDQS

A4.4/5.0
Behavior5/5

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

Annotations only declare it is a non-read-only, non-destructive, non-idempotent write; the description goes far beyond that, disclosing the two-stage write (draft now, bank payment and bill settlement only on owner approval), voucher numbering behavior before approval, refusals (duplicate reference, foreign currency, credit-card account, pre-start-date opening bills), the duplicate-bank-line warning with a `warning` field, and re-derivation of allocation at filing and approval. That is exactly the mutation context an agent needs before calling.

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 purpose is correctly front-loaded and nearly every clause carries operational information, but the body is a single semicolon-chained block with stacked parentheticals that is hard to scan. It would read far better split into short labeled sentences (approval, sources, refusals, edge cases) without losing content.

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 15-parameter, non-idempotent mutation with no output schema, the description covers approval lifecycle, refusals, warnings, and result fields (`voucherPreviewUrl`, `paidBeforeBill`, `warning`). The one omission is duplicate-submission behavior: with idempotentHint=false, an agent is not told whether re-filing the same payment creates a second draft or is caught.

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%, so the baseline would be 3, but the description adds real meaning the schema lacks: how `paymentDate` interacts with bill dates (advance handling, `paidBeforeBill`, the accounting-start-date rule) and how a lump `total` fills net-of-debit-note figures while an explicit amount may leave refundable credit. Some of the reference-vs-purchaseId and allocation logic is repeated from the schema rather than added.

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 and resource — filing a pending supplier-payment draft that raises a payment voucher — and immediately bounds it by the approval gate. It distinguishes itself from adjacent tools by naming where supplier and bill data come from (resolve_vendor, ap_aging, search_documents) and by contrasting the FX case with 'Banking → Match', so an agent can tell it apart from create_payment_match_draft.

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?

Gives concrete routing: supplier from resolve_vendor, bills from ap_aging or search_documents, amendments via revise_draft (kind 'payment'), and FX differences handled in Banking → Match rather than here. It never states an explicit 'do not use this when X, use create_payment_match_draft instead', which is the main remaining gap, but the positive guidance is unusually complete.

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