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.

Import bank statement into the review queue (nothing posts)

import_bank_statement
Destructive

Imports a bank or credit-card statement that has been read (PDF, CSV or image) into Banking → Review. Nothing posts: the user categorizes and posts each row there. A statement is one account's transactions over a period; intake_contract(doc_type:'statement') lists the company's accounts, their currencies and the balance rule. Inputs: the account id, the printed opening and closing balances, statementDate and beginningBalanceDate when printed, and every row with a signed amount (+ money in, − money out). Opening plus the rows must tie to the closing balance, or the import is refused with the exact difference. A foreign-currency account's statement imports, but its lines cannot be posted or matched yet. A credit-card statement needs signConvention (refused on a bank account); each card line is expensed on its own date, and the line that pays the card bill is excluded automatically. An overlapping period is refused unless confirmOverlap is true. A statement another account of the company already holds (the same balances, dates and amounts, imported through this tool or as a file) is refused, naming that account and linking its statement. The original file is archived on the statement (s.82 record-keeping) when attachmentToken (from request_attachment_upload) or an inline file comes with the import; without one nothing is archived. Repeating an identical import with a token adopts the file onto the existing statement, and adding the two dates records them, without staging any row twice. Single receipts, invoices and bills have their own draft tools.

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": {
      "bankAccountId": "<bankAccountId>",
      "openingBalance": "<openingBalance>",
      "closingBalance": "<closingBalance>",
      "rows": "<rows>"
    },
    "name": "import_bank_statement"
  }
}

Input Schema

NameRequiredDescriptionDefault
rowsYes
bankAccountIdYes
statementDateNoThe statement date printed on the statement (the ending-balance date), `YYYY-MM-DD`: the end of the period, even when the last transaction is earlier. Omitted only when the statement prints none.
closingBalanceYes
confirmOverlapNotrue when the user has confirmed this is a separate statement whose period overlaps one already imported; it bypasses the overlap guard that stops the same transactions counting twice.
openingBalanceYes
signConventionNoRequired for a credit-card account, refused for a bank account: the sign of the rows and balances. 'PRINTED_CARD' = as the card prints them (a purchase positive, a payment or refund negative, balances owed positive). 'STORED' = Taokeh's convention (a spend negative, balances negative while owed). A wrong choice still ties out, so it books the month backwards.
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 statement bytes have been PUT to its uploadUrl. Not combined with attachmentBase64. The file is archived on the statement and downloadable from its page.
attachmentBase64NoThe original statement as base64, for small files (a few KB); a statement PDF normally goes through request_attachment_upload and `attachmentToken`. Not combined with attachmentToken. A bad type or oversize file is refused and nothing is imported.
attachmentSha256NoSHA-256 of the original file as 64 hex characters: an optional second integrity check on attachmentBase64.
attachmentFilenameNoThe original filename, shown when browsing statements.
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.
beginningBalanceDateNoThe date on the opening-balance line, `YYYY-MM-DD`: the start of the period. Every row falls between it and statementDate. Omitted only when the statement prints none.
confirmSignConventionNotrue when the user confirms the card sat in credit for the whole period; it bypasses the directional check that refuses a statement reading as a card that never owed anything (usually a printed statement declared 'STORED', or the reverse).

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. Changed11 schema fields changed
    • changedInput schema / properties / attachmentBase64 / description
      Previous value: -"The ORIGINAL statement as base64 — SMALL files only (a few KB). A real bank statement PDF is never that small, so in practice use request_attachment_upload + attachmentToken instead. Mutually exclusive with attachmentToken. A bad type/oversize file is rejected and NOTHING is imported."New value: +"The original statement as base64, for small files (a few KB); a statement PDF normally goes through request_attachment_upload and `attachmentToken`. Not combined with attachmentToken. A bad type or oversize file is refused and nothing is imported."
    • 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 / attachmentFilename / description
      Previous value: -"The original filename, for the user browsing their statements."New value: +"The original filename, shown when browsing statements."
    • changedInput schema / properties / attachmentMediaType / description
      Previous value: -"The attachment's MIME type, e.g. '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 statement bytes to its uploadUrl. This is the normal way to archive a statement PDF — it carries the file out-of-band (no base64 in this call). Mutually exclusive with attachmentBase64. The file is archived on the statement and the user downloads it from the statement page in Taokeh."New value: +"The token from request_attachment_upload, once the statement bytes have been PUT to its uploadUrl. Not combined with attachmentBase64. The file is archived on the statement and downloadable from its page."
    • changedInput schema / properties / beginningBalanceDate / description
      Previous value: -"The date on the BEGINNING (opening) BALANCE line, YYYY-MM-DD — the start of the period. Every row must fall between it and statementDate. Omit it only if the statement prints none."New value: +"The date on the opening-balance line, `YYYY-MM-DD`: the start of the period. Every row falls between it and statementDate. Omitted only when the statement prints none."
    • changedInput schema / properties / confirmOverlap / description
      Previous value: -"Set to true ONLY after the user has confirmed this is a genuinely new, separate statement whose period overlaps one already imported. It bypasses the overlap guard that stops the same transactions being counted twice. Never set it to push an overlap through — ask the user first."New value: +"true when the user has confirmed this is a separate statement whose period overlaps one already imported; it bypasses the overlap guard that stops the same transactions counting twice."
    • changedInput schema / properties / confirmSignConvention / description
      Previous value: -"Set true ONLY after the user confirms that the card genuinely sat in CREDIT for the whole period. It bypasses the directional check that refuses a statement reading as a card which never owed anything — the usual cause of which is a printed statement declared 'STORED' (or the reverse). Never set it to push a refusal through: ask the user first."New value: +"true when the user confirms the card sat in credit for the whole period; it bypasses the directional check that refuses a statement reading as a card that never owed anything (usually a printed statement declared 'STORED', or the reverse)."
    • changedInput schema / properties / signConvention / description
      Previous value: -"REQUIRED when bankAccountId is a CREDIT CARD, and refused on a bank account. Which convention you signed the rows AND the opening/closing balances in. 'PRINTED_CARD' = exactly as the card statement prints them: a purchase is POSITIVE (what you owe goes up), a payment or refund is NEGATIVE, and the balances are the printed balances owed — this is the right choice when you read the card's own statement. 'STORED' = already converted to Taokeh's stored convention: a spend is NEGATIVE, a payment or refund POSITIVE, and the balances negative while money is owed. Do not guess between them: the wrong declaration books the entire month backwards, and the arithmetic check cannot catch it because negating every figure still ties out. Ask the user if unsure."New value: +"Required for a credit-card account, refused for a bank account: the sign of the rows and balances. 'PRINTED_CARD' = as the card prints them (a purchase positive, a payment or refund negative, balances owed positive). 'STORED' = Taokeh's convention (a spend negative, balances negative while owed). A wrong choice still ties out, so it books the month backwards."
    • changedInput schema / properties / statementDate / description
      Previous value: -"The statement date printed on the statement (the ENDING BALANCE date), YYYY-MM-DD — it is the end of the period the statement covers, even when the last transaction is earlier. Omit it only if the statement prints none."New value: +"The statement date printed on the statement (the ending-balance date), `YYYY-MM-DD`: the end of the period, even when the last transaction is earlier. Omitted only when the statement prints none."
  3. Changed1 schema field changed
    • changedInput schema / properties / attachmentMediaType / description
      Previous value: -"The attachment's MIME type, e.g. 'application/pdf'. Required when attachmentBase64 is given."New value: +"The attachment's MIME type, e.g. '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 / beginningBalanceDate
      Added value: +{
      +  "description": "The date on the BEGINNING (opening) BALANCE line, YYYY-MM-DD — the start of the period. Every row must fall between it and statementDate. Omit it only if the statement prints none.",
      +  "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
      +  "type": "string"
      +}
    • addedInput schema / properties / statementDate
      Added value: +{
      +  "description": "The statement date printed on the statement (the ENDING BALANCE date), YYYY-MM-DD — it is the end of the period the statement covers, even when the last transaction is earlier. Omit it only if the statement prints none.",
      +  "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
      +  "type": "string"
      +}
  5. Changed2 schema fields changed
    • addedInput schema / properties / confirmSignConvention
      Added value: +{
      +  "description": "Set true ONLY after the user confirms that the card genuinely sat in CREDIT for the whole period. It bypasses the directional check that refuses a statement reading as a card which never owed anything — the usual cause of which is a printed statement declared 'STORED' (or the reverse). Never set it to push a refusal through: ask the user first.",
      +  "type": "boolean"
      +}
    • addedInput schema / properties / signConvention
      Added value: +{
      +  "description": "REQUIRED when bankAccountId is a CREDIT CARD, and refused on a bank account. Which convention you signed the rows AND the opening/closing balances in. 'PRINTED_CARD' = exactly as the card statement prints them: a purchase is POSITIVE (what you owe goes up), a payment or refund is NEGATIVE, and the balances are the printed balances owed — this is the right choice when you read the card's own statement. 'STORED' = already converted to Taokeh's stored convention: a spend is NEGATIVE, a payment or refund POSITIVE, and the balances negative while money is owed. Do not guess between them: the wrong declaration books the entire month backwards, and the arithmetic check cannot catch it because negating every figure still ties out. Ask the user if unsure.",
      +  "enum": [
      +    "PRINTED_CARD",
      +    "STORED"
      +  ],
      +  "type": "string"
      +}
  6. 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"
      +}
  7. Changed4 schema fields changed
    • addedInput schema / properties / attachmentBase64
      Added value: +{
      +  "description": "The ORIGINAL statement as base64 — SMALL files only (a few KB). A real bank statement PDF is never that small, so in practice use request_attachment_upload + attachmentToken instead. Mutually exclusive with attachmentToken. A bad type/oversize file is rejected and NOTHING is imported.",
      +  "type": "string"
      +}
    • addedInput schema / properties / attachmentFilename
      Added value: +{
      +  "description": "The original filename, for the user browsing their statements.",
      +  "type": "string"
      +}
    • addedInput schema / properties / attachmentMediaType
      Added value: +{
      +  "description": "The attachment's MIME type, e.g. 'application/pdf'. Required when attachmentBase64 is given.",
      +  "type": "string"
      +}
    • addedInput schema / properties / attachmentToken
      Added value: +{
      +  "description": "The token from request_attachment_upload, AFTER you have PUT the statement bytes to its uploadUrl. This is the normal way to archive a statement PDF — it carries the file out-of-band (no base64 in this call). Mutually exclusive with attachmentBase64. The file is archived on the statement and the user downloads it from the statement page in Taokeh.",
      +  "type": "string"
      +}
  8. First observed

TDQS

A4.4/5.0
Behavior4/5

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

Adds substantial behavior beyond the annotations: the opening+rows=closing tie-out with refusal showing the exact difference, overlap refusal, duplicate-statement detection naming the holding account, and conditional archiving of the original file. It also clarifies that nothing posts (mutation is staged into review, consistent with destructiveHint=false effects on ledgers) and that a repeat import with a token adopts the file without staging rows twice. What is missing is the result shape, which matters for a non-idempotent mutating call.

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 'nothing posts' guarantee, and every sentence carries a rule rather than filler. It is a single dense paragraph for 15 parameters, though, so a bulleted split of rules (tie-out, overlap, duplicate, attachment, card) would be easier to scan than the current wall of text.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Covers the domain rules an agent needs to call correctly, including the failure modes that dominate this tool, which is strong for a 15-parameter import. However, with no output schema, the description never says what a successful import returns (statement id, staged row count), leaving the agent unable to describe or verify the outcome.

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 73% schema coverage the schema already documents most fields, yet the description adds essential meaning the schema does not: rows carry signed amounts (+ money in, − money out), dates come from the printed statement, and attachmentToken derives from request_attachment_upload. It also explains when signConvention applies and that attachmentToken/attachmentBase64 are alternatives rather than complements.

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 ('Imports a bank or credit-card statement... into Banking → Review') and immediately scopes the effect ('Nothing posts'). The closing line explicitly separates it from sibling draft tools for single receipts, invoices and bills, so an agent can discriminate without opening schemas.

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?

Gives explicit routing: use this for whole statements, use the draft tools for single receipts/invoices/bills, and call intake_contract(doc_type:'statement') first to get accounts and currencies. It also states the conditions that select optional params (confirmOverlap, signConvention, confirmSignConvention) and the cases that block use (foreign-currency lines can't post or match).

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