Search paid expenses
search_expensesSearches 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
| Name | Required | Description | Default |
|---|---|---|---|
| to | No | ||
| ref | No | Not a filter on this tool. Pass the supplier/receipt reference as `reference`. | |
| from | No | ||
| memo | No | Not a filter on this tool. Pass memo text as `text`. | |
| text | No | Partial text to match in the expense memo/description (case-insensitive contains). | |
| refNo | No | Not a filter on this tool. Pass the supplier/receipt reference as `reference`. | |
| number | No | Not a filter on this tool. Pass the supplier/receipt reference as `reference` — a posted expense has no document number of its own. | |
| vendor | No | 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`. | |
| account | No | Not a filter on this tool. Pass the chart-of-accounts code as `accountCode` (exact). | |
| category | No | Not a filter on this tool. Pass the category by its chart-of-accounts code as `accountCode` (exact) — get codes from expense_accounts. | |
| supplier | No | 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`. | |
| maxAmount | No | ||
| minAmount | No | ||
| reference | No | Partial supplier/receipt reference (case-insensitive contains). | |
| accountCode | No | Restrict to one expense category by its account code (exact). | |
| description | No | Not a filter on this tool. Pass memo text as `text`. |