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 supplier debit note draft

create_supplier_debit_note_draft

Files a debit-note draft against one supplier bill: goods sent back to the supplier, or a credit the supplier gave on that bill. It lowers what is owed to the supplier once a person approves it in Taokeh; nothing posts before then. purchaseId is the bill's id (search_documents, docType 'bill'); the bill must be in ringgit. Each line names a product on that bill (productId from resolve_product), the quantity, and optionally unitAmount (default: the bill line's cost) and billLineNo (needed when the product is on more than one line of the bill). goodsReturned on each line says whether the goods physically went back; it only pre-selects the reviewer's answer. The draft is approved on its review page only, where the person decides line by line whether stock goes out; there is no one-tap approval link. One draft waits per bill: a second filing on the same bill is refused, naming the waiting draft, which revise_draft changes or, if you filed it, withdraw_draft takes back (a draft older than 30 days is replaced). The bill line's discount is shared out by quantity when a line is returned at the bill's cost; tax follows the bill. At filing the note is run through the same checks as the app's debit-note form: never dated before the bill, not in a locked period, no more than the bill still has un-returned per product, and above what the bill still owes the supplier's credit note number (supplierCreditNoteNo) is needed. A refusal files nothing and names the fix. Returns the draft id, the note's computedTotal and the review link.

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": {
      "purchaseId": "<purchaseId>",
      "dnDate": "<dnDate>",
      "lines": "<lines>"
    },
    "name": "create_supplier_debit_note_draft"
  }
}

Input Schema

NameRequiredDescriptionDefault
linesYes
notesNoShort reviewer note (one or two sentences, in the reviewer's language) naming what to double-check: a smudged total, an uncertain party, a judgment call. Shown on the approval card. Empty when nothing needs flagging.
dnDateYesThe debit-note date, YYYY-MM-DD (not before the bill date).
reasonNoWhy the goods went back or the credit was given; it prints on the note.
purchaseIdYesThe supplier bill's id (search_documents, docType 'bill').
needsReviewNo
supplierCreditNoteNoNoThe number on the supplier's own credit note, when there is one. Needed when the note is more than the bill still owes.

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. Added

TDQS

A4.6/5.0
Behavior4/5

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

Well beyond the annotations, it discloses that nothing posts until human approval on the review page, that there is no one-tap approval link, that goodsReturned only pre-selects the reviewer's answer, the one-draft-per-bill rule with the 30-day replacement, how discount and tax are apportioned, and the full set of filing-time validations including the supplierCreditNoteNo condition. The only gap is that it never mentions the needsReview parameter or what it changes about the approval flow.

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 purpose, then ordered from inputs to filing checks to refusal behavior and return values, which mirrors how an agent reasons about the call. It is dense — long compound sentences covering discount apportionment and validation rules — but nearly every clause carries behavioral information unavailable elsewhere, so little is expendable.

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 mutating, draft-creating tool with no output schema, it covers the approval lifecycle, duplicate handling, validation rules and the return payload (draft id, computedTotal, review link). An agent has everything needed to call it correctly and to interpret a refusal.

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?

With 71% schema coverage the schema already documents most fields, yet the description still adds real meaning: purchaseId must reference a ringgit bill, unitAmount defaults to the bill line's cost, billLineNo is only needed when the product appears on multiple bill lines, and supplierCreditNoteNo is required only when the note exceeds what the bill still owes. It does not cover needsReview, which is undocumented in both the schema and the description.

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?

Opens with a specific verb and resource: "Files a debit-note draft against one supplier bill", then immediately scopes it to the two legitimate cases (goods returned, or a supplier credit on that bill). The "supplier" qualifier and the reference to a supplier bill separate it cleanly from customer-side siblings such as create_credit_note_draft and create_supplier_refund_draft.

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?

States when to use it (returned goods or a credit on a bill) and routes to alternatives by name: search_documents to find the bill, resolve_product for ids, revise_draft to change a waiting draft, withdraw_draft to take back one you filed. It also states the exclusion case explicitly — a second filing on the same bill is refused and names the waiting draft — which is exactly the guidance an agent needs before calling.

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