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

create_expense_draft

Files a paid-expense draft in Taokeh from a receipt. It does not post: the draft stays pending until a person approves it in Taokeh, and only that approval reaches the ledger. debitAccountCode and creditAccountCode are codes listed by expense_accounts; the field rules are in intake_contract. amountUncertain marks a printed total with an uncertain digit; needsReview with a short notes line flags any other doubt for the reviewer. The original receipt can ride the draft and lands on the posted entry on approval, sent one way per call: inline as attachmentBase64 + attachmentMediaType for a small file (with attachmentBytes, so a truncated paste is refused), an attachmentToken from request_attachment_upload for a larger file, or shoeboxItemId for a Shoebox photo. Inline also works for a client that cannot reach taokeh.my for the separate upload. Returns the draft id, review and approval links, and a possibleDuplicate block when a matching entry may already be posted.

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": {
      "date": "<date>",
      "debitAccountCode": "<debitAccountCode>",
      "creditAccountCode": "<creditAccountCode>",
      "amount": "<amount>"
    },
    "name": "create_expense_draft"
  }
}

Input Schema

NameRequiredDescriptionDefault
dateYes
memoNo
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.
amountYes
currencyNo
inputTaxNo
referenceNo
needsReviewNo
shoeboxItemIdNoId of the Shoebox photo (from shoebox_items) this draft was read from. Taokeh attaches its own stored copy, so no image is sent with it; mutually exclusive with attachmentBase64 and attachmentToken. A photo already booked, set aside or carrying a pending draft is refused. Approval closes the Shoebox item.
amountUncertainNo
attachmentBytesNoDecoded byte size of the original file. With attachmentBase64, the server refuses a truncated paste instead of filing a corrupt file.
attachmentTokenNoToken from request_attachment_upload, after the file bytes were PUT to its uploadUrl; carries a larger file without base64. Mutually exclusive with attachmentBase64. Lands on the posted entry on approval.
attachmentBase64NoThe original receipt as base64, for a small file (a few KB). It rides the draft and lands on the posted entry on approval. A bad type or oversize file is refused and nothing is filed.
attachmentSha256NoSHA-256 of the original file (64 hex chars): an optional second check alongside attachmentBase64.
debitAccountCodeYes
creditAccountCodeYes
attachmentFilenameNoOptional original filename, e.g. receipt.jpg.
attachmentMediaTypeNoMIME type, e.g. 'image/jpeg' or 'application/pdf'. Needed with attachmentBase64; a type that does not match the 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. Changed8 schema fields changed
    • changedInput schema / properties / attachmentBase64 / description
      Previous value: -"The ORIGINAL receipt as base64 — SMALL files only (a few KB). Base64 inside a tool call is costly, so for a real receipt photo or a multi-page PDF use request_attachment_upload instead (attachmentToken). Rides the draft and lands on the posted entry on approval — no re-upload. A bad type/oversize file is rejected and NOTHING is filed."New value: +"The original receipt as base64, for a small file (a few KB). It rides the draft and lands on the posted entry on approval. 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. With attachmentBase64, the server refuses a truncated paste instead of filing a corrupt file."
    • changedInput schema / properties / attachmentFilename / description
      Previous value: -"Optional original filename for the attachment, e.g. receipt.jpg."New value: +"Optional original filename, e.g. receipt.jpg."
    • 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: +"MIME type, e.g. 'image/jpeg' or 'application/pdf'. Needed with attachmentBase64; a type that does not match the 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 (64 hex chars): an optional second check alongside 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 posted entry on approval, exactly as an inline one does."New value: +"Token from request_attachment_upload, after the file bytes were PUT to its uploadUrl; carries a larger file without base64. Mutually exclusive with attachmentBase64. Lands on the posted 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: +"Short 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."
    • changedInput schema / properties / shoeboxItemId / description
      Previous value: -"The id of a SHOEBOX photo (from shoebox_items) that this draft was read from — the paper someone in the business snapped and sent in. Taokeh attaches ITS OWN stored copy of that photo to the draft, so DO NOT also send the image: no re-upload, no base64, nothing to truncate. Mutually exclusive with attachmentBase64 and attachmentToken. The item must still be waiting: one already booked, set aside, or already carrying a pending draft is refused with the reason. Approving the draft closes that shoebox item against the document it became."New value: +"Id of the Shoebox photo (from shoebox_items) this draft was read from. Taokeh attaches its own stored copy, so no image is sent with it; mutually exclusive with attachmentBase64 and attachmentToken. A photo already booked, set aside or carrying a pending draft is refused. Approval closes the Shoebox item."
  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
    • addedInput schema / properties / shoeboxItemId
      Added value: +{
      +  "description": "The id of a SHOEBOX photo (from shoebox_items) that this draft was read from — the paper someone in the business snapped and sent in. Taokeh attaches ITS OWN stored copy of that photo to the draft, so DO NOT also send the image: no re-upload, no base64, nothing to truncate. Mutually exclusive with attachmentBase64 and attachmentToken. The item must still be waiting: one already booked, set aside, or already carrying a pending draft is refused with the reason. Approving the draft closes that shoebox item against the document it became.",
      +  "type": "string"
      +}
  5. 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"
      +}
  6. First observed

TDQS

A4.6/5.0
Behavior5/5

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

Annotations only give the generic safe-mutation profile, and the description adds real substance: the draft stays pending, only human approval reaches the ledger, refusals occur for truncated pastes, mismatched media types, oversize files and already-booked Shoebox items, and a possibleDuplicate block may be returned. It also states the return payload (draft id, review and approval links), which annotations cannot convey.

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 and the non-posting caveat, then parameter guidance, then return shape — a sensible order for an 18-parameter tool. It is dense but not bloated; the main cost is repetition, with "lands on the posted entry on approval" and "nothing is filed" restated across attachment options.

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 complex 18-parameter mutation with no output schema, the definition covers the lifecycle (pending versus posted), where to look up account codes and field rules, all attachment paths, failure modes and the return payload. An agent can call this correctly and interpret the response without further context.

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 only 44% schema description coverage, the description carries real weight: it names the source of debitAccountCode/creditAccountCode (expense_accounts), explains amountUncertain, needsReview, the reviewer-facing notes line, and the mutual exclusivity and purpose of the three attachment modes including attachmentBytes as a truncation guard. It leaves date, amount, currency, inputTax, reference and memo undefined, so the compensation is substantial but not complete.

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?

"Files a paid-expense draft in Taokeh from a receipt" gives a specific verb, resource, source artifact and system. The immediately following "It does not post" separates it sharply from any posting tool and from the other create_*_draft siblings.

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?

Strong guidance on the three attachment routes with explicit conditions: inline base64 for a small file, attachmentToken for a larger file, shoeboxItemId for a Shoebox photo, plus the fallback when the client cannot reach taokeh.my. It does not say when to prefer this over update_expense_draft or another draft creator, so tool-selection guidance is incomplete even though parameter-path selection is excellent.

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