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.

Search paid expenses

search_expenses
Read-only

Searches paid expenses already posted to the books (the /expenses register) by any combination of reference (partial), memo/description text (partial), date range, amount range and category account code; at least one filter is required. Returns compact rows (expenseId, date, amount, category account code and name, memo, reference), newest first, capped, with a more flag. Each row says whether the original receipt is on file: hasAttachment plus an attachments list (filename, media type, size, attachmentId); an empty list means no receipt is attached. The expenseId and attachmentId are the ids get_attachment reads. A receipt already booked here is booked; filing it again through create_expense_draft would book it twice. search_documents does not cover paid expenses.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "search_expenses"
  }
}

Input Schema

NameRequiredDescriptionDefault
toNo
refNoNot a filter on this tool. Pass the supplier/receipt reference as `reference`.
fromNo
memoNoNot a filter on this tool. Pass memo text as `text`.
textNoPartial text to match in the expense memo/description (case-insensitive contains).
refNoNoNot a filter on this tool. Pass the supplier/receipt reference as `reference`.
numberNoNot a filter on this tool. Pass the supplier/receipt reference as `reference` — a posted expense has no document number of its own.
vendorNoNot a filter on this tool. A posted expense carries no party field here — search the supplier name as `text` (it matches the memo/description) or as `reference`.
accountNoNot a filter on this tool. Pass the chart-of-accounts code as `accountCode` (exact).
categoryNoNot a filter on this tool. Pass the category by its chart-of-accounts code as `accountCode` (exact) — get codes from expense_accounts.
supplierNoNot a filter on this tool. A posted expense carries no party field here — search the supplier name as `text` (it matches the memo/description) or as `reference`.
maxAmountNo
minAmountNo
referenceNoPartial supplier/receipt reference (case-insensitive contains).
accountCodeNoRestrict to one expense category by its account code (exact).
descriptionNoNot a filter on this tool. Pass memo text as `text`.

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. Changed9 schema fields changed
    • changedInput schema / properties / account / description
      Previous value: -"NOT a filter on this tool. Pass the chart-of-accounts code as `accountCode` (exact)."New value: +"Not a filter on this tool. Pass the chart-of-accounts code as `accountCode` (exact)."
    • changedInput schema / properties / category / description
      Previous value: -"NOT a filter on this tool. Pass the category by its chart-of-accounts code as `accountCode` (exact) — get codes from expense_accounts."New value: +"Not a filter on this tool. Pass the category by its chart-of-accounts code as `accountCode` (exact) — get codes from expense_accounts."
    • changedInput schema / properties / description / description
      Previous value: -"NOT a filter on this tool. Pass memo text as `text`."New value: +"Not a filter on this tool. Pass memo text as `text`."
    • changedInput schema / properties / memo / description
      Previous value: -"NOT a filter on this tool. Pass memo text as `text`."New value: +"Not a filter on this tool. Pass memo text as `text`."
    • changedInput schema / properties / number / description
      Previous value: -"NOT a filter on this tool. Pass the supplier/receipt reference as `reference` — a posted expense has no document number of its own."New value: +"Not a filter on this tool. Pass the supplier/receipt reference as `reference` — a posted expense has no document number of its own."
    • changedInput schema / properties / ref / description
      Previous value: -"NOT a filter on this tool. Pass the supplier/receipt reference as `reference`."New value: +"Not a filter on this tool. Pass the supplier/receipt reference as `reference`."
    • changedInput schema / properties / refNo / description
      Previous value: -"NOT a filter on this tool. Pass the supplier/receipt reference as `reference`."New value: +"Not a filter on this tool. Pass the supplier/receipt reference as `reference`."
    • changedInput schema / properties / supplier / description
      Previous value: -"NOT a filter on this tool. A posted expense carries no party field here — search the supplier name as `text` (it matches the memo/description) or as `reference`."New value: +"Not a filter on this tool. A posted expense carries no party field here — search the supplier name as `text` (it matches the memo/description) or as `reference`."
    • changedInput schema / properties / vendor / description
      Previous value: -"NOT a filter on this tool. A posted expense carries no party field here — search the supplier name as `text` (it matches the memo/description) or as `reference`."New value: +"Not a filter on this tool. A posted expense carries no party field here — search the supplier name as `text` (it matches the memo/description) or as `reference`."
  3. Changed9 schema fields changed
    • addedInput schema / properties / account
      Added value: +{
      +  "description": "NOT a filter on this tool. Pass the chart-of-accounts code as `accountCode` (exact)."
      +}
    • addedInput schema / properties / category
      Added value: +{
      +  "description": "NOT a filter on this tool. Pass the category by its chart-of-accounts code as `accountCode` (exact) — get codes from expense_accounts."
      +}
    • addedInput schema / properties / description
      Added value: +{
      +  "description": "NOT a filter on this tool. Pass memo text as `text`."
      +}
    • addedInput schema / properties / memo
      Added value: +{
      +  "description": "NOT a filter on this tool. Pass memo text as `text`."
      +}
    • addedInput schema / properties / number
      Added value: +{
      +  "description": "NOT a filter on this tool. Pass the supplier/receipt reference as `reference` — a posted expense has no document number of its own."
      +}
    • addedInput schema / properties / ref
      Added value: +{
      +  "description": "NOT a filter on this tool. Pass the supplier/receipt reference as `reference`."
      +}
    • addedInput schema / properties / refNo
      Added value: +{
      +  "description": "NOT a filter on this tool. Pass the supplier/receipt reference as `reference`."
      +}
    • addedInput schema / properties / supplier
      Added value: +{
      +  "description": "NOT a filter on this tool. A posted expense carries no party field here — search the supplier name as `text` (it matches the memo/description) or as `reference`."
      +}
    • addedInput schema / properties / vendor
      Added value: +{
      +  "description": "NOT a filter on this tool. A posted expense carries no party field here — search the supplier name as `text` (it matches the memo/description) or as `reference`."
      +}
  4. First observed

TDQS

A4.6/5.0
Behavior4/5

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

With readOnlyHint/destructiveHint already covering safety, the description still adds real behavior: result ordering (newest first), a result cap with a `more` flag, and the semantics of hasAttachment/attachments including that an empty list means no receipt. It does not quantify the cap or state pagination mechanics for the `more` flag, which keeps it short of a 5.

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 required-filter condition, then return shape, then receipt/attachment semantics, then sibling routing — a logical order. It is dense single-paragraph prose with a couple of overlapping points (hasAttachment vs the attachments list) that could be tightened, but no sentence is filler.

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 16-parameter, filter-heavy read tool with no output schema, the description supplies the return fields, ordering, cap behavior, and attachment signaling, plus routing to get_attachment and away from the draft-creation path. Nothing an agent needs in order to call it correctly and interpret the result is missing.

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?

Schema coverage is 75% and the schema itself carries heavy redirection text, but the description still adds matching semantics the schema does not summarize: partial vs case-insensitive contains for reference and text, range semantics for dates and amounts, and exact account code. It does not explain what happens when filters are combined beyond "any combination" (AND vs OR), which is a minor remaining gap.

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 ("Searches paid expenses already posted to the books") and enumerates the filter axes the tool operates on. It explicitly differentiates from siblings: search_documents "does not cover paid expenses" and create_expense_draft would double-book. An agent can pick this tool without opening any schema.

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 an explicit entry condition ("at least one filter is required") and names the downstream tool for the ids returned ("expenseId and attachmentId are the ids get_attachment reads"). It also warns off the wrong alternative (create_expense_draft would book it twice) and rules out search_documents for this data.

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