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 receipt draft

create_receipt_draft

Files a pending customer-payment draft ("customer paid X"). On approval in Taokeh it writes a bank receipt, settles the invoices and issues the official receipt (the next OR number, dated as the payment), as Sales → Receive payment does; nothing posts before that. It settles an existing customer's open invoices: customerId comes from resolve_customer and the open invoices from open_invoices. It takes either a lump total (allocated oldest first) or per-invoice allocations, which the server re-derives against live outstanding amounts. MYR only; a foreign-currency invoice is refused (it is settled in Banking → Payments). Approval books a bank account, so a cash payment is recorded in Taokeh under Sales → Official receipts → Receive payment with Received into = Cash. A receipt dated on or before the accounting start date never settles an opening invoice (that money is already counted in it): allocations naming one are refused and a lump total skips it. The payment proof (bank-in slip, remittance advice) can ride the draft and lands on the settlement entry on approval: inline (attachmentBase64 + attachmentMediaType + attachmentBytes) for small files or a client that cannot reach taokeh.my, or attachmentToken from request_attachment_upload; one lane per call.

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": {
      "receiptDate": "<receiptDate>"
    },
    "name": "create_receipt_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.
totalNo
customerNo
customerIdNo
allocationsNo
needsReviewNo
receiptDateYes
printedTotalNo
bankAccountIdNo
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 (bank-in 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. bank-in-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. Changed6 schema fields changed
    • changedInput schema / properties / attachmentBase64 / description
      Previous value: -"The ORIGINAL payment proof (bank-in 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 (bank-in 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 / 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 vendor/customer 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."
  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. Changed2 schema fields changed
    • addedInput schema / properties / attachmentBytes
      Added value: +{
      +  "description": "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.",
      +  "exclusiveMinimum": 0,
      +  "maximum": 9007199254740991,
      +  "type": "integer"
      +}
    • addedInput schema / properties / attachmentSha256
      Added value: +{
      +  "description": "The SHA-256 of the ORIGINAL file as 64 hex chars — optional second check alongside attachmentBase64, so corrupted bytes are rejected instead of filed.",
      +  "type": "string"
      +}
  5. First observed

TDQS

A4.2/5.0
Behavior4/5

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

Annotations only cover the safety profile (not read-only, not destructive, not idempotent, closed-world), so the description carries the real burden and does it well: nothing posts before approval, approval books a bank account and issues the official receipt, and the server re-derives allocations against live outstanding amounts. The accounting-start-date trap and the refused-foreign-currency case are valuable non-obvious behaviors. What's missing is retry/idempotency behavior for a non-idempotent mutation and what happens to an unapproved 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?

Front-loaded with the core action and its post-approval consequences before the operational rules. Information density is high with little filler, though several parentheticals and the UI-path asides (Sales → Receive payment, Banking → Payments) lengthen it; some of that orientation detail could be trimmed without loss.

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 mutation with no output schema that creates a draft with real accounting effects, the description supplies the accounting model, the currency restriction, the opening-invoice edge case, and attachment handling. It is nearly complete; the remaining shortfall is a few undocumented parameters and no statement about retries or error surfacing.

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?

At 47% schema coverage the description must compensate, and it does so for the highest-risk parameters: `total` allocated oldest first, `allocations` re-derived server-side, `receiptDate` dated as the payment with the opening-invoice rule, and the two attachment lanes (inline base64 trio vs `attachmentToken`, one lane per call). Gaps remain on `customer` vs `customerId`, `printedTotal`, and `bankAccountId`, none of which the description explains.

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?

States a specific verb and resource — files a pending customer-payment draft that, on approval, writes a bank receipt, settles invoices and issues the next OR number. The downstream effect is spelled out precisely enough that an agent knows what the call ultimately produces. It stops short of naming the closest draft sibling (create_payment_draft) so the boundary between the two is left implicit.

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?

Explicitly routes the agent to resolve_customer for `customerId`, open_invoices for the open invoices, and request_attachment_upload for large files, and states the two mutually exclusive shapes (lump `total` vs per-invoice `allocations`) with when to prefer each. It also gives a hard exclusion — MYR only, foreign-currency invoices are refused and settled in Banking → Payments. Little 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