Skip to main content
Glama

Taokeh MCP server

Pending draft: match a posted payment to open invoices or bills (human approves in Taokeh)

create_payment_match_draft

FILES A PENDING DRAFT ONLY — NOTHING CHANGES UNTIL A HUMAN REVIEWS AND APPROVES IT IN TAOKEH. Propose how ONE bank line already posted as a customer payment (money in) or a supplier payment (money out) settles open invoices or bills — the owner's "this deposit paid these three invoices". An admin or bookkeeper reviews it and approves; only that tap allocates, exactly as Banking → Match → Save does, and the documents then read as paid. Pass bankTransactionId (a POSTED line from bank_review_queue with status "posted") and allocations: [{saleId, amount}] for money in, [{purchaseId, amount}] for money out, ringgit, adding up to the WHOLE line to the sen (the in-app pane's ±0.10 rounding allowance does not apply to a proposal). At most 50 documents. WHICH DOCUMENTS: only the ones Banking → Match offers this line — the open invoices of the customer the line is posted against (or, when that customer has none open, the invoices of the company's walk-in customer — the one the owner marked on its customer page, else a customer named 'CASH SALES'), or the supplier's open bills. A line with no customer at all is offered nothing. A document of ANY other party is refused, because no screen in Taokeh offers it: if the payment was posted against the wrong customer, or no customer, the owner unposts the line in Banking, sets the right customer, and posts it again — then file this. A refusal lists the documents the line can take, with their ids. ALSO REFUSED BY NAME, at filing and again at approval: a line not posted, not a customer/supplier payment, already matched (a match someone saved is never replaced), or on a foreign-currency account (Taokeh does not post or match those lines yet); a document not open; an amount over what a document still owes; a document dated AFTER the payment (an advance is allocated by hand); the same document twice; a pending match already filed for the line. If the line or a document changes before approval (paid, credited, re-tagged, matched), approval refuses and nothing is allocated. note: one short line for the owner saying how you know (the remittance, the customer's message).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
noteNoA SHORT note for the owner: how you know which documents it paid.
linesNoNOT a filter on this tool. Pass the documents as `allocations`: [{saleId or purchaseId, amount}].
notesNoNOT a filter on this tool. Pass the owner note as `note`.
bankLineIdNoNOT a filter on this tool. Pass the bank line as `bankTransactionId`.
allocationsYesWhere the money goes. An unknown key is refused by name.
needsReviewNoSet true when something gave you pause.
transactionIdNoNOT a filter on this tool. Pass the bank line as `bankTransactionId`.
bankTransactionIdYesREQUIRED — the posted bank line, from bank_review_queue (status "posted").

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.7/5.0
Behavior4/5

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

Annotations only say readOnlyHint=false, destructiveHint=false, idempotentHint=false; the description adds far more — nothing mutates until a human approves, at most 50 documents, refusals by name at filing and re-checked at approval, and staleness refusal if the line or a document changes. The only gap is the absence of any statement about what a successful response contains, though the refusal payload (documents the line can take, with ids) is described.

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 critical constraint (pending draft, nothing changes until approval) is front-loaded in caps, and most sentences carry load given the number of refusal modes. It is nevertheless long, with some repetition around the refusal list and the re-check at approval that could be tightened.

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 mutation-tool with 8 parameters, no output schema, and non-trivial eligibility rules, the description covers preconditions, scope of allowed documents, refusal modes, and cardinality limits. No output schema exists, and the one return-ish detail (refusals list eligible documents with ids) is supplied.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/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 real semantics: bankTransactionId must be a POSTED line from bank_review_queue, allocations must use saleId for money in and purchaseId for money out, must be in ringgit, and must sum to the WHOLE line to the sen (no ±0.10 rounding allowance). It also clarifies the decoy parameters (lines/notes/bankLineId/transactionId are not filters on this tool).

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 ('Propose how ONE bank line ... settles open invoices or bills') and immediately frames it as a pending draft that a human approves. It distinguishes itself from the other draft-creation siblings by naming the exact in-app equivalent (Banking → Match → Save) and the money-in vs money-out branches.

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 about when to use it, what qualifies as a valid input line, and what to do when it does not (unpost the line in Banking, set the right customer, repost, then file). It also enumerates when the tool refuses and why, which is precisely the when/when-not guidance an agent needs.

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