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 (the owner settles those in the app); 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.9/5.0
Behavior5/5

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

With annotations all false, the description carries the full burden and does so thoroughly. It discloses that nothing changes until human approval, that approval allocates exactly like Banking → Match → Save, that refusals occur both at filing and approval, and that any change to the line or document before approval causes refusal. This is rich behavioral context beyond the annotations.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is long but every sentence earns its place. It is front-loaded with the most critical behavioral caveat, then logically proceeds through purpose, parameters, eligible documents, refusal conditions, and the note. The structure is clear and the density is justified by the complex matching rules.

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?

The description comprehensively covers input requirements, eligibility, refusal conditions, and the approval workflow. However, it does not explicitly state what a successful response looks like (e.g., a draft identifier or confirmation), which is a minor gap given there is no output schema. The failure response is partially described (refusal lists documents), but success return is left implicit.

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?

The description adds substantial meaning beyond the schema: it specifies that bankTransactionId must be a POSTED line from bank_review_queue with status 'posted', explains the allocations format with saleId vs purchaseId and the requirement to sum to the whole line, and explicitly warns that 'lines', 'notes', 'bankLineId', and 'transactionId' are NOT filters and should be passed under the correct parameter names. This is far beyond the schema descriptions.

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?

The description opens with a clear, emphatic statement of what the tool does: 'FILES A PENDING DRAFT ONLY' and then specifies the exact operation: proposing how one posted bank line settles open invoices or bills. It distinguishes itself from sibling create_*_draft tools by emphasizing the human-approval step and the Banking → Match → Save equivalence.

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?

The description explicitly states when to use the tool (for a posted bank line from bank_review_queue), enumerates refusal conditions (not posted, already matched, foreign-currency, etc.), and provides a concrete alternative workflow (unpost, set the right customer, repost). This is explicit when/when-not guidance with alternatives.

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