# ExpenseBot (remote · mcp.expensebot.ai)

Capture receipts, scan Gmail, analyze spending, and create reviewed reports from AI assistants.

- Trust score: 78/100 (medium)
- Change this week: 0
- Registry status: active
- Liveness: live
- Owner verified: no
- Last scored: 2026-09-20

## Components

- remote · `mcp.expensebot.ai`: 78/100 (this document), [markdown](https://verifymcp.io/servers/totesmagotes-mcp-server-auth/mcp.md), [page](https://verifymcp.io/servers/totesmagotes-mcp-server-auth/mcp)
- npm · `@expensebot/mcp-server-auth`: 79/100, [markdown](https://verifymcp.io/servers/totesmagotes-mcp-server-auth/expensebot-mcp-server-auth.md), [page](https://verifymcp.io/servers/totesmagotes-mcp-server-auth/expensebot-mcp-server-auth)

## Channel facts

- Endpoint: `https://mcp.expensebot.ai/mcp`
- Transports: `streamable-http`
- Auth: `none`
- Version: `0.6.25`

## Trust breakdown

How this component scores in each security and reliability category. Every signal is checked automatically against the live server, and we only credit what we can confirm. Scores are 0–100 per category. Scoring method: https://verifymcp.io/docs/scoring (what has changed: https://verifymcp.io/docs/scoring/changelog)

Scored 2026-09-20.

- **Endpoint Security**: 63/100
  - The endpoint's TLS certificate is valid, in date, and uses a strong key.
  - Authorisation check failed: no authorisation is required to call this server, and it exposes a tool marked destructive (share_report).
  - HTTPS is enforced; there's no plaintext access path.
  - The HSTS (Strict-Transport-Security) header is present.
  - DNSSEC check failed: this domain isn't protected by DNSSEC.
- **Transport & Reachability**: 100/100
  - Verified streamable-http transport via a live MCP handshake.
- **Schema Quality & AI Usability**: 64/100
  - AI-judged instruction clarity (excellent).
  - Context-footprint check failed: tool/resource definitions use about 14731 tokens (~249/item across 59 items; 59 tools + 0 resources), over budget; trim descriptions and params.
  - Usage-examples check failed: none of the tools include examples.
- **Stability & Change Management**: 96/100
  - Stability check failed: schema churn in the 30 days we've observed: 0 tool removals, 5 breaking changes, 0 auth/transport breaks, 0 additions.
- **Tool Coverage**: 99/100
  - 100% of tools have a non-trivial description (not blank, and not just the tool's name).
  - 97% of tool parameters carry a description.
  - Structured output schemas are declared (100% of tools); any adoption earns full credit.
- **Tool Safety**: 100/100
  - No prompt-injection markers were found in the server instructions, tool names or descriptions we captured.
  - All 1 tool(s) whose name or description implies an irreversible operation declare an MCP destructiveHint annotation.
  - An AI judge read all 60 captured unit(s) of tool text and found none that tries to manipulate the model reading it.
- **Capabilities**: 100/100
  - Implements a supported MCP spec version (2025-11-25); the latest is 2026-07-28.

## Install

### How do I install the ExpenseBot MCP server?

ExpenseBot is a hosted endpoint at https://mcp.expensebot.ai/mcp, so there is nothing to install locally. Ready-made configuration for Claude, Cursor, VS Code, Codex and 5 more is on this page, copied from each client's own documentation.

### Claude

```bash
claude mcp add --transport http totesmagotes-mcp-server-auth 'https://mcp.expensebot.ai/mcp'
```

### Cursor

```json
{
  "mcpServers": {
    "totesmagotes-mcp-server-auth": {
      "url": "https://mcp.expensebot.ai/mcp"
    }
  }
}
```

### VS Code

```json
{
  "servers": {
    "totesmagotes-mcp-server-auth": {
      "type": "http",
      "url": "https://mcp.expensebot.ai/mcp"
    }
  }
}
```

### Codex

```toml
[mcp_servers.totesmagotes-mcp-server-auth]
url = "https://mcp.expensebot.ai/mcp"
```

### opencode

```json
{
  "$schema": "https://opencode.ai/config.json",
  "mcp": {
    "totesmagotes-mcp-server-auth": {
      "type": "remote",
      "url": "https://mcp.expensebot.ai/mcp",
      "enabled": true
    }
  }
}
```

### OpenClaw

```bash
openclaw mcp add totesmagotes-mcp-server-auth --url 'https://mcp.expensebot.ai/mcp' --transport streamable-http
```

### Hermes

```yaml
mcp_servers:
  totesmagotes-mcp-server-auth:
    url: "https://mcp.expensebot.ai/mcp"
```

### Netclaw

```json
{
  "McpServers": {
    "totesmagotes-mcp-server-auth": {
      "Transport": "http",
      "Url": "https://mcp.expensebot.ai/mcp"
    }
  }
}
```

### Vellum

```bash
assistant mcp add totesmagotes-mcp-server-auth -t streamable-http -u 'https://mcp.expensebot.ai/mcp'
```

### Other

```json
{
  "mcpServers": {
    "totesmagotes-mcp-server-auth": {
      "type": "http",
      "url": "https://mcp.expensebot.ai/mcp"
    }
  }
}
```

The mcpServers block is a cross-client convention. Remote transports vary, so check your client's docs.

## Changelog

Every change recorded for this component, newest first. Days that predate change tracking, or that we cannot explain, say so: "we were watching and nothing happened" and "we were not watching" are different claims.

### 2026-09-10 (score 78, +2)

- [security regression] A breaking change shipped without a version bump: still 0.3.1-m3.6
- [security] Tool “update_expense” rewrote its description, which is the text the model reads
- [security] Tool “fix_compliance” rewrote its description, which is the text the model reads
- [security] Tool “add_income” rewrote its description, which is the text the model reads
- [functional regression] “fix_compliance” added a required parameter “operationId”, so existing callers break
- [functional regression] “fix_compliance” dropped the required parameter “value”
- [functional regression] “fix_compliance” dropped the required parameter “reportId”
- [functional regression] “fix_compliance” dropped the required parameter “action”
- [functional improvement] Tool coverage: 61% → 100%
- [functional improvement] Tool “trace_document” now declares an output schema
- [functional improvement] Tool “submit_receipt” now declares an output schema
- [functional improvement] Tool “update_expense” now declares an output schema
- [functional improvement] Tool “fix_compliance” now declares an output schema
- [functional improvement] Tool “export_report” now declares an output schema
- [functional improvement] Tool “create_report” now declares an output schema
- [functional improvement] Tool “create_client_invoice” now declares an output schema
- [functional improvement] Tool “correct_expenses” now declares an output schema
- [functional improvement] Tool “add_mileage_entry” now declares an output schema
- [functional improvement] Tool “add_income_from_file” now declares an output schema
- [functional improvement] Tool “add_income_from_csv” now declares an output schema
- [functional improvement] Tool “add_income” now declares an output schema
- [functional improvement] Tool “add_cash_expense” now declares an output schema
- [functional improvement] Tool “group_expenses” now declares an output schema
- [functional improvement] Tool “mark_client_invoice_paid” now declares an output schema
- [functional improvement] Tool “parse_expense” now declares an output schema
- [functional improvement] Tool “prepare_client_invoice” now declares an output schema
- [functional improvement] Tool “process_gmail_receipts” now declares an output schema
- [functional improvement] Tool “request_accounting_integration” now declares an output schema
- [functional improvement] Tool “scan_gmail” now declares an output schema
- [functional improvement] Tool “scan_gmail_years” now declares an output schema
- [functional improvement] Tool “send_report_to_accounting” now declares an output schema
- [functional improvement] Tool “share_report” now declares an output schema
- [cosmetic] “fix_compliance” added an optional parameter “selection”
- [cosmetic] “fix_compliance” added an optional parameter “confirm”
- [cosmetic] “fix_compliance” added an optional parameter “change”
- [cosmetic] “fix_compliance” added an optional parameter “status”
- [cosmetic] “fix_compliance” added an optional parameter “undo”

### 2026-09-09 (score 76, +4)

- [functional improvement] Tool coverage: 10% → 61%
- [functional improvement] Tool “get_expense_splits” now declares an output schema
- [functional improvement] Tool “get_expense_by_id” now declares an output schema
- [functional improvement] Tool “get_deep_analytics” now declares an output schema
- [functional improvement] Tool “get_credits_refunds” now declares an output schema
- [functional improvement] Tool “get_client_invoice” now declares an output schema
- [functional improvement] Tool “get_client_advance_balances” now declares an output schema
- [functional improvement] Tool “get_accounting_push_status” now declares an output schema
- [functional improvement] Tool “get_accounting_integration_status” now declares an output schema
- [functional improvement] Tool “check_tax_deductibility” now declares an output schema
- [functional improvement] Tool “check_feature” now declares an output schema
- [functional improvement] Tool “check_compliance” now declares an output schema
- [functional improvement] Tool “get_subscription_audit” now declares an output schema
- [functional improvement] Tool “get_spending_summary” now declares an output schema
- [functional improvement] Tool “list_categories” now declares an output schema
- [functional improvement] Tool “list_client_invoices” now declares an output schema
- [functional improvement] Tool “list_income_categories” now declares an output schema
- [functional improvement] Tool “list_reports” now declares an output schema
- [functional improvement] Tool “list_tags” now declares an output schema
- [functional improvement] Tool “whatif_afford” now declares an output schema
- [functional improvement] Tool “whatif_client” now declares an output schema
- [functional improvement] Tool “whatif_tax_setaside” now declares an output schema
- [functional improvement] Tool “get_trip_suggestions” now declares an output schema
- [functional improvement] Tool “get_scan_status” now declares an output schema
- [functional improvement] Tool “get_report_details” now declares an output schema
- [functional improvement] Tool “get_recent_activity” now declares an output schema
- [functional improvement] Tool “get_pnl” now declares an output schema
- [functional improvement] Tool “get_per_tag_pnl” now declares an output schema
- [functional improvement] Tool “get_monthly_books_review” now declares an output schema
- [functional improvement] Tool “get_mileage_summary” now declares an output schema
- [functional improvement] Tool “get_income_summary” now declares an output schema

### 2026-09-08 (score 72, +1)

No change was recorded against any check on this day. Stability & Change Management went from 46 to 49.

### 2026-09-06 (score 71, +1)

No change was recorded against any check on this day. Stability & Change Management went from 39 to 43.

### 2026-09-04 (score 70, +1)

No change was recorded against any check on this day. Stability & Change Management went from 33 to 36.

### 2026-09-02 (score 69, +1)

No change was recorded against any check on this day. Stability & Change Management went from 26 to 29.

### 2026-08-31 (score 68, +1)

No change was recorded against any check on this day. Stability & Change Management went from 19 to 23.

### 2026-08-29 (score 67, +1)

- [security] Tool “share_report” rewrote its description, which is the text the model reads
- [cosmetic] “create_report” added an optional parameter “recipientRole”
- [cosmetic] “share_report” added an optional parameter “recipientRole”

## MCP tools (59)

### `search_expenses` (~472 tokens)

Search and filter the user's expenses. Returns matching expense rows from their spreadsheet. Filter by category, merchant, date range, amount, or tags. Results are paginated: when hasMore is true, call again with nextCursor and the same filters. Do not split a date range into repeated overlapping searches.

Use the optional query parameter for deterministic natural-language recall over merchant, city/location, Notes (including receipt items, delivery source, payer, and Business purpose), Tag, and category. Each matching result includes matchedFields and a short matchReason so you can explain why it was selected. When several rows plausibly match, a disambiguation list is returned; each option carries the exact expenseId. Structured filters (categories, merchants, dateRange, tags, minAmount, maxAmount) combine with the query using AND semantics. Each result includes expenseId, the exact durable Receipt ID required by update_expense.

Input parameters:

- `categories` (array): Filter by expense categories (e.g., ['Travel', 'Meals'])
- `clientEmail` (string): Client account email. Accountants may use this only for an accepted ExpenseBot client.
- `cursor` (string): Opaque nextCursor returned by the previous search_expenses page. Reuse the same filters; never construct or edit this value.
- `dateRange`: Time period filter. Use exactly one variant — pick the shape that matches the user's phrasing.
- `hasReceipt` (boolean): When true, return only expenses with a receipt link. When false, return only expenses without one.
- `limit` (integer): Results per page (default 20, maximum 50)
- `maxAmount` (number): Maximum expense amount
- `merchants` (array): Filter by merchant names (e.g., ['Uber', 'Starbucks'])
- `minAmount` (number): Minimum expense amount
- `query` (string): Optional natural-language recall over the user's existing expense fields (merchant, city/location, Notes including receipt items, delivery source, payer, and Business purpose, Tag, category). Determi…
- `tags` (array): Filter by tags

Output parameters:

- `count` (integer): Rows matched by the filters.
- `expenses` (array): Matching expense rows, newest first, paginated.
- `hasMore` (boolean)
- `message` (string)
- `nextCursor` (string|null): Opaque signed continuation; reuse with identical filters.
- `pageInfo` (object)
- `queryApplied` (string)
- `total` (number): Sum of the matched set in home currency.
- `totalMatched` (integer): Present for free-text searches.

### `get_spending_summary` (~183 tokens)

Summarize the user's recorded expenses with totals and breakdowns by category, merchant, month, tag, source, or payment method. Supports date ranges, period comparisons, and total, count, or average metrics. Read-only. Returns: { message, data: { total, breakdown?, comparison?, sampleMeta? } }.

Input parameters:

- `categories` (array): Optional configured expense categories to include in the summary.
- `clientEmail` (string): Client account email. Accountants may use this only for an accepted ExpenseBot client.
- `dateRange`: Time period filter. Use exactly one variant — pick the shape that matches the user's phrasing.
- `groupBy` (string)
- `metric` (string)
- `query` (string): Natural language question (e.g., 'how much did I spend in March', 'top merchants this quarter')

Output parameters:

- `data` (object|null): Inline branch: computed analytics, or null when no spreadsheet / no data.
- `estimatedTime` (number): Async branch only: seconds.
- `jobId` (string): Async branch only.
- `message` (string): Human-readable narrative (both branches).
- `pollEndpoint` (string): Async branch only.
- `pollInterval` (number): Async branch only: milliseconds.
- `response` (string): Chat alias of message.
- `success` (boolean): Async branch only.
- `type` (string): Async branch only: "analytics_pending" — poll pollEndpoint or call poll_analytics with jobId.

### `get_deep_analytics` (~125 tokens)

Run deeper, multi-step analytics on the user's expenses. Use for explanatory questions like 'why did my spending increase' or 'compare Q1 vs Q2'. Takes 10-30 seconds (runs as a background job, polled automatically). Returns: { message, data: { ..., sampleMeta? } } where sampleMeta.isTruncated indicates whether the agent saw the full dataset.

Input parameters:

- `dateRange`: Time period filter. Use exactly one variant — pick the shape that matches the user's phrasing.
- `query` (string, required): The analytics question to answer

Output parameters:

- `data` (object|null): Inline branch: computed analytics, or null when no spreadsheet / no data.
- `estimatedTime` (number): Async branch only: seconds.
- `jobId` (string): Async branch only.
- `message` (string): Human-readable narrative (both branches).
- `pollEndpoint` (string): Async branch only.
- `pollInterval` (number): Async branch only: milliseconds.
- `response` (string): Chat alias of message.
- `success` (boolean): Async branch only.
- `type` (string): Async branch only: "analytics_pending" — poll pollEndpoint or call poll_analytics with jobId.

### `create_report` (~457 tokens)

Create an expense report from a clear date, client, project, trip, category, or merchant request. Tags are ExpenseBot's grouping layer for clients, projects, project codes, and trips; call list_tags when the user's intended group is unclear. For requests such as 'all expenses in August except personal', set excludePersonal=true; this excludes both the Personal tag and Personal expense category, matching ExpenseBot's Report Wizard. Returns the report summary, exact report link, Bill Client link, applied filters, and a prefilled Report Wizard fallback for criteria that need visual review. Reports scoped to an existing client/project/trip group include matching expenses that are not already assigned to another ordinary report. Can optionally share with recipients. If no unreported matches remain, create no duplicate report and explain that the expenses are already in Reports. Terminal results also include role-appropriate accountingHandoffUrls from the server capability matrix and the existing reviewed file-export workflow. Use only the exact destination the user requested; the link opens the reviewed app flow and does not mean an export occurred. Complete the requested report directly; do not call check_compliance, get_report_details, or tax/deductibility tools before or after it unless the user explicitly asks for that separate analysis.

Input parameters:

- `categories` (array): Optional configured expense categories to include in the report.
- `dateRange`: Time period filter. Use exactly one variant — pick the shape that matches the user's phrasing.
- `excludePersonal` (boolean): Exclude expenses whose Tag is Personal or whose Expense Category is Personal.
- `excludedCategories` (array): Expense categories to exclude from the report.
- `excludedTags` (array): Existing ExpenseBot groups to exclude from the report.
- `recipientRole` (string): Access for every shareWith recipient. Use reviewer for one-report review, comments, approval, or change requests. Use accountant only when the user explicitly wants ongoing report management and acco…
- `shareWith` (array): Email addresses to share the report with
- `tags` (array): Existing ExpenseBot groups to include, such as a client, project, project code, property, or trip. Use list_tags first when uncertain.
- `title` (string): Custom report title

Output parameters:

- `accountingHandoffUrls` (object)
- `accountingSetupUrl` (string)
- `billClientUrl` (string)
- `creationStatus` (string)
- `data` (object)
- `finalAnswer` (string)
- `nextActions` (array)
- `reportId` (string)
- `reportUrl` (string)
- `responseGuidance` (string)
- `success` (boolean)

### `list_reports` (~143 tokens)

List the user's expense reports with pagination. Filter by status (All, Draft, Submitted, Shared). Each exact report includes its app, Bill Client, and accounting handoff URLs. Use the matching accounting URL only when the user explicitly asks to send or export that report; the app keeps organization, mapping, preview, and final confirmation.

Input parameters:

- `clientEmail` (string): Client account email. Accountants may use this only for an accepted ExpenseBot client.
- `filter` (string): Optional report-status filter; All returns every authorized status.
- `limit` (integer): Maximum reports to return on this page.
- `page` (integer): One-based results page to return.

Output parameters:

- `creationStatus` (string): Provenance of the listing, e.g. "existing_only".
- `filter` (string)
- `limit` (integer)
- `page` (integer)
- `reports` (array): Present when the user has reports.
- `responseGuidance` (string)
- `success` (boolean)

### `request_accounting_integration` (~144 tokens)

Request support for an accounting package only after checking ExpenseBot's reviewed direct and import-file destinations and finding no matching package. Do not use this for a listed or Beta destination, a general compatibility question, or without the exact package name. This is a confirmation-gated write: after the user approves, it creates one deduplicated request bound to the authenticated ExpenseBot account and emails ExpenseBot's internal team. It does not create an integration or make the requested package immediately available. On accepted or previously recorded requests, tell the user ExpenseBot will email them within one week with an update.

Input parameters:

- `packageName` (string, required): Exact accounting package requested by the user.

Output parameters:

- `duplicate` (boolean)
- `message` (string)
- `packageName` (string)
- `success` (boolean)

### `get_report_details` (~137 tokens)

Get full details of a specific expense report including all expenses, totals, and compliance status. Use only when the user explicitly asks to inspect an existing report's details. Never call this as a preflight or follow-up to creating, sharing, or billing from a report; those tools already return the required result and links.

Input parameters:

- `clientEmail` (string): Client account email. Accountants may use this only for an accepted ExpenseBot client.
- `reportId` (string, required): The report/spreadsheet ID
- `userRequest` (string, required): The user's exact request asking to inspect this report. Do not paraphrase or invent diagnostic intent.

Output parameters:

- `report` (object): The full stored report record.
- `success` (boolean)

### `share_report` (~116 tokens)

Share one existing expense report after confirmation. Default to reviewer: they can open and edit that report's Google Sheet, inspect receipts, comment, approve, or request changes, but cannot act for the owner or use accounting integrations. Use accountant only when the user explicitly asks for ongoing accounting access; it creates the established accountant relationship and broader report-management workflow.

Input parameters:

- `recipientRole` (string): Use reviewer for report-only approval. Use accountant only for explicit ongoing accountant access.
- `recipients` (array, required)
- `reportId` (string, required)

Output parameters:

- `finalAnswer` (string)
- `message` (string)
- `recipientRole` (string)
- `responseGuidance` (string)
- `sharedWith` (array)
- `success` (boolean)

### `check_compliance` (~119 tokens)

Use only when the user explicitly asks to check an existing report for compliance issues such as missing business purpose or policy violations. Creating a report, excluding Personal expenses, sharing a report, or billing a client is not a compliance request; never call this tool automatically as a preflight or follow-up for those workflows.

Input parameters:

- `reportId` (string, required): Report ID to check
- `userRequest` (string, required): The user's exact request explicitly asking for compliance, policy, audit, substantiation, or business-purpose analysis. Do not paraphrase or invent intent.

Output parameters:

- `data` (object)
- `message` (string)
- `success` (boolean)

### `fix_compliance` (~292 tokens)

Safely correct compliance issues on an exact bounded set of recorded expenses. Use only after the user explicitly asks to fix issues found by check_compliance. Use search_expenses to obtain each full expenseId, then pass those exact identities; never select every report row or infer a business purpose, category, or attendee. This compatibility tool uses the same reviewed workflow as correct_expenses: the first call always prepares a grounded preview and makes no change, even if confirm:true arrives early. Show the exact proposed changes and ask once for approval. Only after explicit approval repeat the same operationId, selection, and change with confirm:true. The confirmed result reports applied/conflicted/failed counts and supports status and Undo. For tags/groups use group_expenses; for unsupported or more than 100-row cleanup open https://www.expensebot.ai/review-expenses?source=mcp.

Input parameters:

- `change` (object): Exactly one correction. The selected type determines which matching value field is required.
- `confirm` (boolean): Omit/false for preview; true only after explicit approval.
- `operationId` (string, required): Stable idempotency key generated once for preview and reused unchanged.
- `selection` (object): Exact expenses returned by search_expenses and approved for this bounded correction.
- `status` (boolean): Read operation status using operationId.
- `undo` (boolean): Undo a completed correction within its Undo window.

Output parameters:

- `change` (object)
- `confirmation` (object)
- `finalAnswer` (string)
- `manifest` (object)
- `message` (string)
- `operationId` (string)
- `preview` (object)
- `requiresConfirmation` (boolean)
- `responseGuidance` (string)
- `reviewExpensesUrl` (string)
- `status` (string)
- `success` (boolean)
- `undo` (object)

### `check_tax_deductibility` (~162 tokens)

Look up whether a specific expense type or purchase is tax-DEDUCTIBLE (business write-off rules) based on the user's country/jurisdiction. This is a deductibility *advice* tool — use it for questions like 'is Uber deductible', 'can I write off home office', 'are client dinners 50% or 100%'. Do NOT use it for questions about tax REFUNDS received as income (use get_spending_summary with a 'tax refunds' query for those — they're routed to the Income tab, not deduction rules).

Input parameters:

- `category` (string)
- `merchant` (string)
- `query` (string, required): Deductibility question (e.g., 'is Uber tax deductible', 'home office write-off rules')

Output parameters:

- `data` (object)
- `message` (string)
- `success` (boolean)

### `search_knowledge` (~174 tokens)

Search ExpenseBot's complete product and help knowledge base. Use this before guessing when the user asks how a feature works, what ExpenseBot supports, or needs setup, billing, Gmail, scan, report, workflow, or troubleshooting instructions. Set fullAnswer:true on the first call when the user asks for complete, detailed, or step-by-step instructions. Use the default excerpt mode for discovery and quick answers; if an excerpt is truncated, call again with fullAnswer:true before presenting complete instructions. Each result has a stable id.

Input parameters:

- `fullAnswer` (boolean): Set true on the first call for complete, detailed, or step-by-step instructions. Leave false for discovery or quick-answer excerpts.
- `limit` (integer): Number of ranked matching articles to return (1-10).
- `query` (string, required): Search terms

Output parameters:

- `results` (array)
- `success` (boolean)

### `submit_receipt` (~639 tokens)

Submit a photo or PDF of a receipt for processing. Covers requests phrased as 'log this', 'log this receipt', 'save this receipt', 'expense this', or 'add this to my expenses', including when the user simply shares a photo of a receipt or invoice. The receipt image is validated, uploaded to cloud storage, and processed by AI to extract vendor, amount, date, tax, and category. The expense appears in the user's spreadsheet in about 1-3 minutes, and longer for PDFs or large batches. Handles images and PDFs, mixed together in one batch.

TO SEND FILES (preferred, and required for PDFs): call this tool with filesToUpload listing every file the user gave you. It returns one signed upload URL per file. Upload them ONE AT A TIME with an HTTP PUT, telling the user which file you just finished and how many remain, then call this tool ONCE with uploadRefs for all of them — that processes the whole set as a single batch, like the ExpenseBot web app. Do not call this tool once per file.

Use the photo parameter for one image or PDF attached in ChatGPT. MCP clients that cannot supply file references may use photoBase64 for one small image; use the upload flow for large files or batches.

Optional note and tag values use the same receipt metadata path as ExpenseBot's camera, file uploader, and forwarded-email intake. The note is stored in the Notes column (L); the tag is stored in the Tag column (K). Batch defaults apply to every file, and each uploadRefs item may override either value for that file.

Input parameters:

- `filename` (string): Optional filename (e.g., 'lunch_receipt.jpg')
- `filesToUpload` (array): Request upload URLs for one or more files. Include EVERY file the user provided in a single call. Returns one signedUrl + uploadRef per file; upload each, then call this tool again with uploadRefs.
- `mimeType` (string): MIME type of the file (default: image/jpeg)
- `note` (string): Batch-level context note applied to every file in the upload. Individual files may override this with their own note. Stored through the existing receipt-note pipeline in the Notes column (L).
- `photo` (object): Single attached receipt image or PDF supplied by ChatGPT. For multiple files or large files, use filesToUpload and uploadRefs instead.
- `photoBase64` (string): Legacy fallback for MCP clients that send one small image as complete base64 data. ChatGPT should use photo or uploadRefs instead.
- `tag` (string): Batch-level project or client tag applied to every expense row. Individual files may override it. Stored in the Tag column (K) through the same path as the web receipt uploader.
- `uploadRef` (string): Single-file shorthand for uploadRefs. Use uploadRefs when there is more than one file.
- `uploadRefs` (array): Submit previously uploaded files as ONE batch. Include every uploadRef from the filesToUpload step. If any file fails validation the whole batch is rejected and nothing is processed.

Output parameters:

- `data` (object)
- `fileCount` (integer)
- `files` (array)
- `message` (string)
- `reviewExpensesUrl` (string)
- `spreadsheetUrl` (string|null)
- `status` (string)
- `statusCode` (integer)
- `submissionId` (string)
- `success` (boolean)

### `get_last_receipt_result` (~222 tokens)

Check the authoritative final outcome of a receipt image/PDF batch submitted with submit_receipt. After submit_receipt returns submissionId, call this tool with that exact ID using the polling interval and time allowance in the submit_receipt response. A small batch allows at least 5 minutes; larger batches allow longer. A pending result is normal and must not trigger a duplicate resubmission. Returns added, duplicate, skipped, or errored verdicts with exact counts and up to 10 processed receipt summaries. found:false is pending and has no terminal verdict; found:true is terminal. On completion, tell the user what happened and show spreadsheetUrl plus reviewExpensesUrl. This is for uploaded receipts; use get_scan_status for Gmail scans. Read-only.

Input parameters:

- `submissionId` (string): Exact submissionId returned by submit_receipt. Strongly preferred because it binds the result to this upload instead of an earlier receipt.
- `withinSeconds` (integer): Fallback lookback window when submissionId is unavailable (30-3600 seconds; default 600).

Output parameters:

- `counts` (object)
- `data` (object)
- `found` (boolean)
- `message` (string)
- `receipts` (array)
- `reviewExpensesUrl` (string)
- `spreadsheetUrl` (string|null)
- `state` (string): Present on pending polls for a specific submission.
- `submissionId` (string|null)
- `success` (boolean)
- `timestamp` (string|null)
- `verdict` (string): Terminal branch only.

### `add_cash_expense` (~366 tokens)

Add an expense without a receipt, or record money a client provided in advance for expenses. Writes directly to the user's expense spreadsheet after confirmation. For an ordinary expense, call list_categories first and provide a configured Expense Account. For a client advance, set isClientAdvance=true and clientName; ExpenseBot reuses or creates the canonical client group, applies Cash advance received, and stores the amount as a negative expense. Use this only for money supplied by a client before related spending, never for vendor refunds, reimbursements, earned fees, retainers, or generic deposits. Use the Manual expense link from get_spreadsheet_url instead when the user needs a reviewed form for multiple entries, credits/refunds, tax or tip breakdowns, per diem, or incomplete details.

Input parameters:

- `category` (string): A configured Expense Account returned by list_categories. Do not invent a category.
- `city` (string): City/location
- `clientName` (string): Client name for a client advance, in ordinary language. ExpenseBot resolves the canonical Client – Name group.
- `currency` (string): Currency code (default: USD)
- `date` (string, required): Expense date (YYYY-MM-DD)
- `isClientAdvance` (boolean): True only when a client supplied money in advance for expenses. Requires clientName and does not require category.
- `merchant` (string): Merchant/vendor name for an ordinary expense. Not needed for a client advance; ExpenseBot derives it from clientName.
- `notes` (string): Notes or description
- `subtotal` (number): Subtotal before tax
- `tax` (number): Tax amount
- `tip` (number): Tip amount
- `total` (number, required): Positive amount paid or received. ExpenseBot stores a client advance as negative.

Output parameters:

- `data` (object)
- `expense` (object)
- `finalAnswer` (string)
- `message` (string)
- `recordId` (string)
- `responseGuidance` (string)
- `reviewExpensesUrl` (string)
- `rowNumber` (integer)
- `spreadsheetUrl` (string|null)
- `success` (boolean)

### `parse_expense` (~86 tokens)

Parse a natural language expense description into structured fields. Does NOT add the expense — just returns the parsed fields for review. Example: "Lunch at Chipotle $15.50 today" → {merchant: "Chipotle", total: 15.50, ...}

Input parameters:

- `text` (string, required): Natural language expense (e.g., "Coffee at Starbucks $6.50 yesterday")

Output parameters:

- `categoryNames` (array)
- `expenses` (array)
- `success` (boolean)
- `validationErrors` (array)

### `process_gmail_receipts` (~95 tokens)

Process specific Gmail emails as receipts. Pass Gmail message IDs and they'll be converted to PDF, extracted by AI, and added to the user's expense spreadsheet. Max 25 emails per request. Requires Gmail to be connected in ExpenseBot settings.

Input parameters:

- `accountEmail` (string): Optional: which Gmail account to use (for users with multiple linked accounts)
- `emailIds` (array, required): Gmail message IDs to process as receipts

Output parameters:

- `data` (object)
- `emailCount` (integer)
- `error` (string)
- `message` (string)
- `processInfo` (object)
- `processedItems` (array)
- `reviewExpensesUrl` (string)
- `spreadsheetUrl` (string|null)
- `submissionId` (string)
- `success` (boolean)

### `scan_gmail` (~175 tokens)

Trigger a background Gmail scan to discover and process receipt emails from the last ~60 days (default). Runs asynchronously — returns immediately, user gets an email summary when done. Like clicking "Find Receipts in Gmail" in the UI. For whole PAST YEARS (e.g. 2023, or 2020-2022) use scan_gmail_years instead; to check a scan's progress use get_scan_status.

Input parameters:

- `accountEmail` (string): Optional: which Gmail account to scan
- `endDate` (string): Optional: explicit end date (YYYY-MM-DD)
- `lookbackDays` (integer): How many days back to scan (default 60, max depends on subscription)
- `startDate` (string): Optional: explicit start date (YYYY-MM-DD) instead of lookbackDays

Output parameters:

- `_metadata` (object)
- `data` (object)
- `message` (string)
- `orchestrated` (boolean)
- `reviewExpensesUrl` (string|null)
- `scanInProgress` (boolean)
- `sessionId` (string)
- `spreadsheetUrl` (string|null)
- `status` (string)
- `submissionId` (string)
- `success` (boolean)

### `add_mileage_entry` (~270 tokens)

Log a business mileage trip in ExpenseBot. Useful for realtors, consultants, contractors, and anyone who drives for work. Requires the user to have configured their mileage rate (cents/km or cents/mi) and unit (mi/km) in ExpenseBot Settings. The trip writes a row to their expense spreadsheet with the calculated dollar value. Use the Mileage and travel link from get_spreadsheet_url instead when the user needs Google Maps route calculation, mileage settings, repeated trips, calendar/rideshare import, per diem, or visual review.

Input parameters:

- `category` (string): Override the user's default mileage category (optional)
- `city` (string): City (optional)
- `date` (string): Trip date (YYYY-MM-DD). Defaults to today.
- `destination` (string): Destination address or location (optional)
- `distance` (number, required): Distance traveled in the user's configured unit (miles or km)
- `notes` (string): Optional user-supplied context stored with the mileage entry.
- `purpose` (string, required): Business purpose / description of the trip (e.g., 'Client meeting at 1234 Main St')
- `roundTrip` (boolean): If true, doubles the distance (return trip)
- `tag` (string): Tag for client/project attribution (optional)

Output parameters:

- `data` (object)
- `finalAnswer` (string)
- `message` (string)
- `responseGuidance` (string)
- `reviewExpensesUrl` (string)
- `rowNumber` (integer)
- `settings` (object)
- `spreadsheetUrl` (string|null)
- `success` (boolean)

### `add_income` (~337 tokens)

Log exactly one user-confirmed income payment manually (cash, check, Stripe payout, etc.). Never loop this tool over a statement, export, table, or multi-row list. For two or more payments, use add_income_from_csv for CSV/TSV/text or add_income_from_file for an image/PDF; those tools stage a duplicate-checked preview and require confirmation before writing. Writes to the Income tab of the user's expense spreadsheet. Useful for income that isn't auto-detected from Gmail or Plaid. Call list_income_categories first and use one of its fixed tax categories; an omitted category defaults to Service income and an unknown category is rejected.

Input parameters:

- `amount` (number, required): Income amount (>0)
- `category` (string): A category returned by list_income_categories (optional; defaults to Service income)
- `currency` (string): Currency code (default: home currency)
- `date` (string): Income date (YYYY-MM-DD). Defaults to today.
- `description` (string): What the income was for
- `fees` (number): Processor/transfer fees deducted
- `notes` (string)
- `paymentMethod` (string, required): How you got paid. Canonical rails are Cash, Check, Bank transfer, Wallet app, Credit/Debit card, Payment processor, or Other; common labels such as Stripe and Venmo are normalized.
- `reference` (string): Invoice or transaction reference
- `source` (string, required): Who paid you (client name, customer, etc.)
- `tag` (string): Tag for client/project attribution
- `taxCollected` (number): Sales tax/GST/HST collected

Output parameters:

- `data` (object)
- `deduped` (boolean)
- `destinations` (object)
- `finalAnswer` (string)
- `matchedRow` (object)
- `message` (string)
- `recordId` (string)
- `responseGuidance` (string)
- `rowNumber` (integer)
- `success` (boolean)
- `tabCreated` (boolean)

### `add_income_from_file` (~654 tokens)

Import income from an attached screenshot, image (JPEG, PNG, WebP, HEIC/HEIF), or PDF (payment screenshots, wallet apps, payout or bank statements; max 10 MB). This is a two-step tool. STEP 1: call it with the file and WITHOUT confirm — ExpenseBot parses the file with the same importer as the app's Add Income screen, checks every row against the user's Income tab for duplicates, and returns a preview with a previewId, exact row count, totals by currency, per-row details, duplicate flags, and any rejected rows. NOTHING is saved in step 1; treat the attachment as consent to parse, not consent to write. Show the user the parsed rows and duplicates, then STEP 2: call again with confirm: true and the previewId to write exactly those rows. Only include user-approved changes in step 2 (selectedIndexes, keepBothIndexes, rowEdits, tag, bulkNote). Flagged duplicates are skipped unless the user explicitly asks to keep them (keepBothIndexes). The preview expires after 15 minutes; an expired or unknown previewId never writes. After a successful confirm, show the returned spreadsheetUrl and reviewIncomeUrl. For a visually complex review (mixed income/expense rows, many edits), send the user to the Add Income app link returned by get_spreadsheet_url instead.

Input parameters:

- `bulkNote` (string): Step 2 only: one note (max 120 chars) prepended to every confirmed row's Notes, same as the app's 'Add note to all entries'.
- `confirm` (boolean): Step 2 only: true writes the staged rows. Omit it (with previewId absent) to parse and preview without writing.
- `keepBothIndexes` (array): Step 2 only: preview indexes of duplicate-flagged rows the user explicitly wants to keep anyway (the app's 'Keep Both').
- `mimeType` (string): MIME type of the file (default: image/jpeg)
- `paymentMethod` (string): Fallback payment rail for rows where the parser found none (Cash, Check, Bank transfer, Wallet app, Credit/Debit card, Payment processor, or Other).
- `photo` (object): Attached image or PDF supplied by ChatGPT for step 1. The server downloads and parses the attachment securely.
- `photoBase64` (string): Legacy fallback for MCP clients that send complete image/PDF bytes as base64. ChatGPT should use photo.
- `previewId` (string): Step 2 only: the previewId returned by the step-1 call.
- `rowEdits` (array): Step 2 only: user-approved corrections, at most 50 rows. Fields: date (ISO YYYY-MM-DD), source, amount, currency, category, paymentMethod, description, notes, reference, fees, taxCollected, tag.
- `selectedIndexes` (array): Step 2 only: preview row indexes to write. Omit to write all staged rows.
- `tag` (string): Optional client/project tag. In step 1 it pre-fills the staged rows; in step 2 it applies to the confirmed selection.

Output parameters:

- `confirmationContract` (string)
- `confirmed` (boolean)
- `deduped` (integer)
- `duplicateCount` (integer)
- `duplicates` (array)
- `entries` (array)
- `entryCount` (integer)
- `expiresAt` (string)
- `expiresInMinutes` (integer)
- `failed` (integer)
- `finalAnswer` (string)
- `idempotentReplay` (boolean)
- `maxChatEntries` (integer)
- `message` (string)
- `preview` (boolean)
- `previewId` (string)
- `projectionTruncated` (boolean)
- `refundRowCount` (integer)
- `rejectedRows` (array)
- `responseGuidance` (string)
- `reviewImportUrl` (string)
- `reviewIncomeUrl` (string)
- `spreadsheetUrl` (string|null)
- `success` (boolean)
- `tooLargeForChat` (boolean)
- `total` (integer)
- `totalsByCurrency` (object)
- `unattempted` (integer)
- `warnings` (array)
- `written` (integer)

### `add_income_from_csv` (~592 tokens)

Import income from a CSV/TSV/text export (Stripe, PayPal, Square, Cash App, Venmo, OnlyFans, Patreon, Clips4Sale, Ko-fi, Gumroad, Etsy, Uber/Lyft/DoorDash driver exports, bank statements, and similar; max 500 KB). Same two-step contract as add_income_from_file: STEP 1 call with csvContent and WITHOUT confirm parses the file with the same platform-agnostic importer as the app's Add Income screen (platform detection, fee handling, refunds, source aliases, ISO dates) and returns a duplicate-checked preview with a previewId. NOTHING is saved in step 1. Show the user the parsed rows and duplicates, then STEP 2 call again with confirm: true and the previewId to write exactly those rows, optionally with user-approved selectedIndexes, keepBothIndexes, rowEdits, tag, or bulkNote. Flagged duplicates are skipped unless the user explicitly keeps them. The preview expires after 15 minutes and an expired or unknown previewId never writes. After a successful confirm, show the returned spreadsheetUrl and reviewIncomeUrl.

Input parameters:

- `bulkNote` (string): Step 2 only: one note (max 120 chars) prepended to every confirmed row's Notes, same as the app's 'Add note to all entries'.
- `confirm` (boolean): Step 2 only: true writes the staged rows. Omit it (with previewId absent) to parse and preview without writing.
- `csvContent` (object): Attached CSV/TSV/text file supplied by ChatGPT for step 1. The server downloads and decodes the attachment securely.
- `csvText` (string): Legacy fallback for MCP clients that send raw CSV/TSV/text content inline. ChatGPT should use csvContent.
- `keepBothIndexes` (array): Step 2 only: preview indexes of duplicate-flagged rows the user explicitly wants to keep anyway (the app's 'Keep Both').
- `paymentMethod` (string): Fallback payment rail for rows where the parser found none (Cash, Check, Bank transfer, Wallet app, Credit/Debit card, Payment processor, or Other).
- `previewId` (string): Step 2 only: the previewId returned by the step-1 call.
- `rowEdits` (array): Step 2 only: user-approved corrections, at most 50 rows. Fields: date (ISO YYYY-MM-DD), source, amount, currency, category, paymentMethod, description, notes, reference, fees, taxCollected, tag.
- `selectedIndexes` (array): Step 2 only: preview row indexes to write. Omit to write all staged rows.
- `tag` (string): Optional client/project tag. In step 1 it pre-fills the staged rows; in step 2 it applies to the confirmed selection.

Output parameters:

- `confirmationContract` (string)
- `confirmed` (boolean)
- `deduped` (integer)
- `duplicateCount` (integer)
- `duplicates` (array)
- `entries` (array)
- `entryCount` (integer)
- `expiresAt` (string)
- `expiresInMinutes` (integer)
- `failed` (integer)
- `finalAnswer` (string)
- `idempotentReplay` (boolean)
- `maxChatEntries` (integer)
- `message` (string)
- `preview` (boolean)
- `previewId` (string)
- `projectionTruncated` (boolean)
- `refundRowCount` (integer)
- `rejectedRows` (array)
- `responseGuidance` (string)
- `reviewImportUrl` (string)
- `reviewIncomeUrl` (string)
- `spreadsheetUrl` (string|null)
- `success` (boolean)
- `tooLargeForChat` (boolean)
- `total` (integer)
- `totalsByCurrency` (object)
- `unattempted` (integer)
- `warnings` (array)
- `written` (integer)

### `get_accounting_integration_status` (~220 tokens)

Check whether an accounting destination is connected and read-only setup state for the owner. Returns the selected organization/company/business, stored connection state, rollout state, and the single setup link for connecting or reconnecting the destination. When an existing ExpenseBot report is available, pass reportId so the link opens that exact report's provider setup control instead of the general Reports setup. This is read-only and never posts accounting data. Agent-driven posting is currently available only for Zoho Books (zoho_books); QuickBooks Online (quickbooks), Xero (xero), Wave (wave), and FreeAgent (freeagent, beta) are accepted here for connection/setup status only and report writesAuthorized=false until their canonical planning path is shared.

Input parameters:

- `provider` (string, required): Accounting destination provider. QuickBooks Online, Xero, Wave, FreeAgent (beta), or Zoho Books.
- `reportId` (string): Optional existing ExpenseBot report ID. When supplied, setupUrl opens this exact report and highlights the selected accounting provider's setup control.

Output parameters:

- `data` (object): Per-provider connection and rollout state.
- `message` (string)
- `success` (boolean)

### `send_report_to_accounting` (~433 tokens)

Review and then post an ExpenseBot report to the owner's accounting destination. STEP 1: call with provider, reportId, and optional mode/mappings, without confirm. The server reads the live report and destination, applies Omit/Personal/split/date/currency rules, checks Zoho bank-feed matches, and returns the complete proposal plus proposalId. NOTHING is posted in step 1. Show the complete proposal and ask for approval. STEP 2: call with only provider, proposalId, and confirm:true. The server posts only the frozen, account-bound proposal, revalidates live state, and rejects changed reports or mappings. Never add mapping fields to the confirmation call. Owner accounts only; acting for a client is not supported. Agent-driven posting is currently available only for Zoho Books (zoho_books); QuickBooks Online, Xero, Wave, and FreeAgent are intentionally not accepted by this tool yet because their previews cannot freeze/revalidate the canonical provider plan that shareReport executes. Use those providers' web flows until they satisfy the full push contract.

Input parameters:

- `accountMappings` (object): Step 1 only: ExpenseBot category to live destination account ID overrides.
- `confirm` (boolean): Step 2 only: true posts the exact staged proposal. No other options may change.
- `forceRepush` (boolean): Step 1 only: explicitly include disclosed uncertain prior outcomes in the frozen proposal.
- `mode` (string): Step 1 only (Zoho Books): automatic document treatment, paid expenses, or bills.
- `proposalId` (string): Step 2 only: proposalId returned by the read-only preview.
- `provider` (string, required): Accounting destination provider. Agent-driven posting is currently available only for Zoho Books.
- `reportId` (string): Step 1 only: ExpenseBot report ID owned by the signed-in account.
- `reportingTagMappings` (object): Step 1 only: ExpenseBot tag to live destination reporting-tag option.
- `taxMappings` (object): Step 1 only: observed tax-rate string to live destination tax ID overrides.

Output parameters:

- `confirmationContract` (string)
- `confirmationQuestion` (string)
- `confirmationRequired` (boolean)
- `counts` (object)
- `created` (integer)
- `expiresAt` (string)
- `finalAnswer` (string)
- `idempotentReplay` (boolean)
- `matchedExisting` (integer)
- `omittedExpenses` (integer)
- `organization` (object)
- `phase` (string)
- `proposalId` (string)
- `provider` (string)
- `reconciliationRequired` (boolean)
- `reportId` (string)
- `responseGuidance` (string)
- `skippedAlreadyPushed` (integer)
- `success` (boolean)
- `units` (array)

### `get_accounting_push_status` (~131 tokens)

Read the authoritative posting and reconciliation status for one ExpenseBot report at an accounting destination. Use after a timeout or uncertain response before considering any retry. Returns status, submission time, posting mode, posted receipt count, any public error, and whether reconciliation is required. Never re-post a completed report or a report marked needs_reconciliation; show that state to the owner instead. This tool is read-only and owner-account only.

Input parameters:

- `provider` (string, required): Accounting destination provider used for the prior posting attempt.
- `reportId` (string, required): Exact ExpenseBot report ID from the prior proposal or posting attempt.

Output parameters:

- `data` (object)
- `message` (string)
- `success` (boolean)

### `list_categories` (~61 tokens)

List the user's configured expense categories and billing accounts. Use this BEFORE calling tools that need a category (add_cash_expense, add_mileage_entry, create_report) so you pass the user's actual category names, not guesses. Returns the live list from their spreadsheet.

Output parameters:

- `billingAccounts` (array): Billing/card accounts, when configured.
- `categories` (array): Expense categories for the user.
- `success` (boolean)

### `list_tags` (~83 tokens)

List the user's configured groups. ExpenseBot stores clients, projects, project codes, properties, and trips as tags (for example 'Client: Acme', 'Vegas Trip', or 'Property: 123 Main'). Use this when the user asks 'what groups/projects/clients do I have?' and before filtering, grouping, or reporting when the intended existing name is unclear.

Output parameters:

- `success` (boolean)
- `tags` (array): Client / project / trip groups (Column K values).

### `get_income_summary` (~313 tokens)

Get income totals, breakdowns, and analytics from the Income tab. Covers Schedule C / T2125 income, Schedule B drill-in (interest, dividends, tax refunds, security deposits), rental income, and per-source / per-payment-method / per-category / per-month / per-tag breakdowns. Schedule-C-style category exclusions match year-end T6 routing (security deposits, refunds excluded from taxable totals). Examples: 'income YTD', 'income by source', 'rental income by property', 'interest income this year', 'dividends YTD', 'tax refunds 2024', 'income this year vs last' (YoY). Supports period comparison phrasing — YoY ('vs last year'), MoM ('vs last month'), QoQ ('Q1 vs Q2'), same-month-prev-year. Returns: { message, data: { total, breakdown?, comparison?, sampleMeta? } }.

Input parameters:

- `dateRange`: Time period filter. Use exactly one variant — pick the shape that matches the user's phrasing.
- `groupBy` (string): How to group the breakdown
- `incomeTagPrefix` (string): Optional tag-prefix shortcut (e.g., 'Prop –' for rental income, 'Client –' for client billings, 'Wedding –' for events). When set, the tool filters to income rows tagged with this prefix.
- `query` (string): Natural language income question (e.g., 'income YTD by source', 'rental income last month')

Output parameters:

- `data` (object|null): Inline branch: computed analytics, or null when no spreadsheet / no data.
- `estimatedTime` (number): Async branch only: seconds.
- `jobId` (string): Async branch only.
- `message` (string): Human-readable narrative (both branches).
- `pollEndpoint` (string): Async branch only.
- `pollInterval` (number): Async branch only: milliseconds.
- `response` (string): Chat alias of message.
- `success` (boolean): Async branch only.
- `type` (string): Async branch only: "analytics_pending" — poll pollEndpoint or call poll_analytics with jobId.

### `get_pnl` (~229 tokens)

Compute Profit & Loss (P&L / net income / margin) by combining the Income tab with expense tabs. Examples: 'am I profitable this year', 'P&L for Q1', 'net income last quarter', 'what's my margin', 'P&L this year vs last' (YoY). Supports period comparison — YoY, MoM, QoQ, same-month-prev-year. Margin renders as multiplier in loss territory ('expenses 5.4× revenue') so the user gets a readable signal instead of '-436.9% margin'. Returns: { message, data: { revenue, expenses, netIncome, margin, comparison?, sampleMeta? } }.

Input parameters:

- `clientEmail` (string): Client account email. Accountants may use this only for an accepted ExpenseBot client.
- `dateRange`: Time period filter. Use exactly one variant — pick the shape that matches the user's phrasing.
- `query` (string): Natural language P&L question (e.g., 'P&L for Q1 2025', 'am I profitable')

Output parameters:

- `data` (object|null): Inline branch: computed analytics, or null when no spreadsheet / no data.
- `estimatedTime` (number): Async branch only: seconds.
- `jobId` (string): Async branch only.
- `message` (string): Human-readable narrative (both branches).
- `pollEndpoint` (string): Async branch only.
- `pollInterval` (number): Async branch only: milliseconds.
- `response` (string): Chat alias of message.
- `success` (boolean): Async branch only.
- `type` (string): Async branch only: "analytics_pending" — poll pollEndpoint or call poll_analytics with jobId.

### `get_per_tag_pnl` (~256 tokens)

Per-tag P&L — revenue, cost, profit, and margin grouped by tag (per-client, per-property, per-event, per-realtor-deal). Requires both income AND expense rows to be tagged with matching labels. Common tag-prefix shortcuts: 'Prop –' (rentals), 'Client –' (client billings), 'Wedding –' (events), 'Realtor –' (real estate deals). Examples: 'per-tag P&L this year', 'profit by client', 'profit by property', 'profit on the Smith wedding', 'per-client P&L this year vs last' (YoY). Supports YoY / MoM / QoQ comparison phrasing. Margin renders as multiplier in loss territory. Defaults to year-to-date if no date range given.

Input parameters:

- `dateRange`: Time period filter. Use exactly one variant — pick the shape that matches the user's phrasing.
- `query` (string): Natural language per-tag P&L question
- `tagPrefix` (string): Optional prefix to limit which tags are bucketed (e.g., 'Prop –' for properties only, 'Client –' for clients only). When omitted, all tags are included.

Output parameters:

- `data` (object|null): Inline branch: computed analytics, or null when no spreadsheet / no data.
- `estimatedTime` (number): Async branch only: seconds.
- `jobId` (string): Async branch only.
- `message` (string): Human-readable narrative (both branches).
- `pollEndpoint` (string): Async branch only.
- `pollInterval` (number): Async branch only: milliseconds.
- `response` (string): Chat alias of message.
- `success` (boolean): Async branch only.
- `type` (string): Async branch only: "analytics_pending" — poll pollEndpoint or call poll_analytics with jobId.

### `list_income_categories` (~46 tokens)

List ExpenseBot's fixed income tax categories. Unlike Expense Accounts, these are not user-configured. Use this BEFORE calling add_income so you pass an exact canonical category instead of guessing.

Output parameters:

- `categories` (array)
- `legacy` (array): Deprecated income categories still accepted on read.
- `notes` (string)
- `success` (boolean)

### `get_recent_activity` (~159 tokens)

Show what the user (or their AI assistants) has recently done in ExpenseBot via this MCP server: which tools were called, when, with what arguments, and whether they succeeded. This is a log of assistant TOOL CALLS, not the processing history of a document. Useful for questions like 'what did I do this week' or 'which tools has my assistant run', and to give the user transparency into AI-assisted actions. Returns the most recent N entries from the audit log (default 20, max 100).

Input parameters:

- `actionId` (string): Optional: filter to a single tool/action name
- `limit` (integer)
- `sinceDays` (integer): Only show actions from the last N days (default 7)

Output parameters:

- `actions` (array)
- `count` (integer)
- `success` (boolean)

### `trace_document` (~208 tokens)

Trace what happened to a specific receipt, invoice, forwarded email, Gmail receipt, or PDF in ExpenseBot processing. Use when the user asks where a document went, why it did not show up, whether it was skipped, routed to income, deduped, or removed as a duplicate. Returns a read-only timeline from the user's lineage audit trail.

Input parameters:

- `days` (integer): How many days back to search.
- `limit` (integer): Maximum lineage events to return.
- `messageId` (string): Gmail message ID if known.
- `outcome` (string): Optional processing outcome filter.
- `query` (string): Merchant, sender, subject, invoice number, or phrase to search for, e.g. 'Blue Rocket', 'Driversnote', 'Uber receipt'.
- `receiptId` (string): ExpenseBot receipt/invoice ID if known, e.g. IR-123, RO-abc, RR-456.
- `threadId` (string): Gmail thread ID if known.

Output parameters:

- `data` (object)
- `message` (string)
- `success` (boolean)
- `type` (string)

### `get_mileage_summary` (~186 tokens)

Mileage analytics — totals, breakdowns by month / client / purpose / category, plus deduction framing (cents-per-mile or cents-per-km × distance, country-aware IRS / CRA rates). Examples: 'mileage this year', 'miles driven for Acme', 'mileage by month', 'mileage deduction estimate', 'business miles last quarter'. Supports YoY / MoM / QoQ comparison phrasing. Returns: { message, data: { totalDistance, deductionEstimate?, breakdown?, comparison?, sampleMeta? } }.

Input parameters:

- `dateRange`: Time period filter. Use exactly one variant — pick the shape that matches the user's phrasing.
- `groupBy` (string): How to group the breakdown
- `query` (string): Natural language mileage question (e.g., 'mileage this year', 'miles driven for Acme client')

Output parameters:

- `data` (object|null)
- `message` (string)
- `success` (boolean): Present only on the error branch (out of scope) / async path.

### `get_subscription_audit` (~160 tokens)

Subscription audit — wraps the Subscription Auditor engine to find recurring charges, duplicates, price increases, and trial-conversion suspects in the user's expenses. Examples: 'recurring subscriptions', 'duplicate subscriptions', 'price increases', 'trial conversions', 'subscriptions over $20/month'. Returns: { message, data: { recurring, duplicates, priceIncreases, trialConversions, totalMonthlyCost, sampleMeta? } }.

Input parameters:

- `dateRange`: Time period filter. Use exactly one variant — pick the shape that matches the user's phrasing.
- `focus` (string): Narrow the audit to a single category (default: all)
- `query` (string): Natural language subscription question (e.g., 'find duplicate subscriptions', 'price increases this year')

Output parameters:

- `data` (object|null)
- `message` (string)
- `success` (boolean): Present only on the error branch (out of scope) / async path.

### `get_expense_by_id` (~110 tokens)

Fetch a single expense row by its sheet row number or by its ExpenseBot expenseId (the exact Receipt ID in Column Q). Returns the row's headers + values + a labeled {header → value} map so you can refer to a specific expense the user mentioned. Read-only.

Input parameters:

- `expenseId` (string): Exact full ExpenseBot Receipt ID from Column Q
- `rowNumber` (integer): 1-indexed sheet row (row 1 is headers, so ≥ 2)

Output parameters:

- `expense` (object): The expense record.
- `reviewExpenseUrl` (string)
- `rowNumber` (integer): Resolved sheet row for the expense.
- `success` (boolean)

### `export_report` (~82 tokens)

Get a short-lived direct PDF download for one exact authorized expense report, plus the exact highlighted in-app report link. Use the in-app report for CSV, XLSX, receipt ZIP (when available), comments, invoicing, and other visually reviewed actions. Use list_reports first to find the reportId.

Input parameters:

- `reportId` (string, required): Report ID from list_reports

Output parameters:

- `availableInReport` (array)
- `expiresAt` (string)
- `notes` (string)
- `report` (object)
- `success` (boolean)
- `urls` (object)

### `get_spreadsheet_url` (~622 tokens)

Return the user's master ExpenseBot Google Sheet plus authenticated ExpenseBot workspace links, each with a label and a description of when to use it. Use this when the user asks to open, view, check, or edit their spreadsheet; review expenses or income; manually scan Gmail; reconcile; connect or manage a bank/credit card; open Automation Hub or General Settings; create or open reports; or asks where a submitted receipt went. Choose and show the one or two links relevant to the request instead of listing the entire catalog. After a receipt submission, prefer Review expenses plus the Google Sheet. After an income write, prefer Review income plus the Sheet. For a Gmail scan or connection request, use the Scan Gmail link, which opens the existing Gmail scanning interface. Bank/card requests use the Reconcile link; configuration requests use the returned Automation Hub or General Settings link. Category, G/L, and account-code requests use Category management; client, project, and trip groups use Group management; questions about what counts as Personal use Personal rules. For client billing setup, use the returned clientBillingHandoffs instead of giving a generic dashboard tour: manageClients creates or manages the client list, tagReadyExpenses opens Review Expenses filtered to blank or default-Business rows, and createClientReport opens report creation by group after expenses have been assigned. Choose the one next step that matches the user's current state. If the user names a client and an exact expense scope and asks the assistant to do the work, use search_expenses and group_expenses instead; show its grounded preview and require explicit confirmation before changing any rows. When the user asks to choose receipt images from Google Photos, use the returned Google Photos link; it opens the existing authenticated picker and handles any required Google consent in ExpenseBot. When they ask where ExpenseBot stores receipt files, return the Drive folder link only when i…

Output parameters:

- `dashboardUrl` (string)
- `data` (object)
- `gmailActionNeededUrl` (string)
- `gmailScanUrl` (string)
- `message` (string)
- `reportsUrl` (string)
- `reviewExpensesUrl` (string)
- `reviewIncomeUrl` (string)
- `spreadsheetId` (string)
- `spreadsheetUrl` (string)
- `success` (boolean)

### `check_feature` (~80 tokens)

Check whether ExpenseBot supports a specific feature ('does ExpenseBot support X', 'can it integrate with Y'). Searches the public knowledge base and returns a confidence-scored answer + related questions. Works with or without authentication.

Input parameters:

- `feature` (string, required): Feature or integration to check (e.g., 'Xero', 'mileage tracking', 'Plaid')

Output parameters:

- `data` (object)
- `message` (string)
- `success` (boolean)

### `whatif_afford` (~123 tokens)

Can I afford $X/month? Recomputes the user's Safe Monthly Draw (how much they can safely pay themselves) with an added recurring monthly cost, and returns a yes/tight/no verdict plus the before/after numbers. Use for questions like 'can I afford a $500/mo hire' or 'what if I add a $200/mo software subscription'. Requires at least 3 months of income history — otherwise returns insufficient_data rather than a guess.

Input parameters:

- `deltaMonthly` (number, required): The new recurring monthly cost being considered, in the user's home currency

Output parameters:

- `data` (object): The full what-if scenario: assumptions, evidence, and computed outcome.
- `message` (string): Scenario narrative; may be absent if the scenario carried no template or evidence.
- `success` (boolean)

### `whatif_client` (~167 tokens)

What if a client pays late or leaves? mode='late30' shifts that client's OPEN invoice amounts out of the near-term expectation (they still owe it, it's just not landing this month). mode='gone' removes that client's trailing monthly income contribution and recomputes Safe Draw against the reduced baseline. Use for questions like 'what if Acme Corp pays 30 days late' or 'what happens if I lose my biggest client'. Client identity is matched against the Income tab's tag/source/description fields — best effort, not a guaranteed match.

Input parameters:

- `clientName` (string, required): The client's name as it appears on invoices or income rows
- `mode` (string, required): 'late30' = shift open invoices 30 days late; 'gone' = client stops paying entirely

Output parameters:

- `data` (object): The full what-if scenario: assumptions, evidence, and computed outcome.
- `message` (string): Scenario narrative; may be absent if the scenario carried no template or evidence.
- `success` (boolean)

### `whatif_tax_setaside` (~73 tokens)

What should I set aside for taxes? Surfaces the same monthly tax set-aside estimate already computed for Safe Monthly Draw — wiring, not new math. Flat-rate estimate (default 30%) against trailing income minus recurring + variable spend. Use for 'how much should I set aside for taxes this month'.

Output parameters:

- `data` (object): The full what-if scenario: assumptions, evidence, and computed outcome.
- `message` (string): Scenario narrative; may be absent if the scenario carried no template or evidence.
- `success` (boolean)

### `scan_gmail_years` (~231 tokens)

Scan one or more COMPLETED PRIOR years of the user's Gmail for receipts (e.g. years:[2023] or years:[2020,2021,2022]). Long-running background job: the first eligible year starts immediately and the rest queue, running one at a time (each full year typically takes a couple of hours; the user can close the app). ALWAYS call first WITHOUT confirmStart to preview which years are eligible, then ask the user to confirm, then call again with confirmStart:true. For receipts from the last ~60 days use scan_gmail instead. To check how a scan is going, use get_scan_status. The current in-progress year cannot be year-scanned.

Input parameters:

- `accountEmail` (string): Optional: which connected Gmail inbox to scan (multi-inbox users). Defaults to the primary.
- `confirmStart` (boolean): Omit or false = preview only (no scan starts). Must be exactly true to start scanning.
- `years` (array, required): Completed prior years to scan, e.g. [2020, 2021]. Max 10.

Output parameters:

- `account` (string)
- `alreadyQueued` (array)
- `alreadyScanned` (array)
- `archiveThroughYear` (integer)
- `eligible` (array)
- `gmailUrl` (string)
- `message` (string)
- `notEligible` (array)
- `preview` (boolean)
- `queuedYears` (array)
- `scanning` (array)
- `startedYear` (integer|null)
- `success` (boolean)

### `get_scan_status` (~112 tokens)

Check the authoritative status of the user's Gmail receipt scans. Returns the active scan lock, the same live phase and item progress shown by ExpenseBot's in-app status pill, queued or attention-needed years, completed calendar years, current merchant/category exclusions, and recent outcomes. Call when the user asks whether a scan is running, finished, stuck, or what it is doing. When complete, show the returned spreadsheetUrl or reviewExpensesUrl; when setup or reconnection is needed, show gmailScanUrl. Read-only.

Output parameters:

- `data` (object)
- `gmailScanUrl` (string|null)
- `latestScan` (object|null): Most recent scan outcome (success, emailsFound, emailsTagged, timestamp).
- `lock` (object): Scan-lock state (active, startedAt, ageSeconds, dispatchComplete, pendingProcessingCount).
- `message` (string)
- `reviewExpensesUrl` (string|null)
- `scanInProgress` (boolean)
- `spreadsheetUrl` (string|null)
- `status` (string|null): Scan lifecycle state.
- `success` (boolean)

### `list_client_invoices` (~199 tokens)

List the user's issued client invoices (accounts receivable) — who owes them money, how much, and when it is due. Examples: 'which invoices are outstanding', 'what does Acme still owe me', 'any overdue invoices', 'how much am I waiting to get paid'. status accepts 'active' (default), 'open', 'overdue', 'needs_review', 'paid', 'void', 'superseded', or 'all'. Returns invoice numbers, status, totals by currency, delivery state, and private document links. Read-only.

Input parameters:

- `clientEmail` (string): Client account email. Accountants may use this only for an accepted ExpenseBot client.
- `clientName` (string): Optional: exact client name (case-insensitive).
- `limit` (number): Max invoices to return (default 25, max 100).
- `status` (string): Filter by invoice status (default active/outstanding).

Output parameters:

- `invoices` (array)
- `success` (boolean)

### `get_client_invoice` (~149 tokens)

Get the full financial and delivery summary for one issued client invoice, including subtotal, markup, tax, advance applied, balance due, dates, status, source report, and private Google Doc/PDF/DOCX links when available. Provide invoiceId or invoiceNumber — one is required; invoiceNumber is accepted only when it is unique. Read-only.

Input parameters:

- `clientEmail` (string): Client account email. Accountants may use this only for an accepted ExpenseBot client.
- `invoiceId` (string): Stable invoice ID from list_client_invoices. Required unless invoiceNumber is supplied.
- `invoiceNumber` (string): Human invoice number when invoiceId is unavailable; it must identify one unique invoice.

Output parameters:

- `invoice` (object): The invoice record. Absent only on the error branch (not-found), which never carries structuredContent.
- `message` (string)
- `success` (boolean)

### `prepare_client_invoice` (~370 tokens)

Prepare a client invoice from a saved ExpenseBot report without creating it. Reads canonical report rows, allocates a unique invoice number, verifies the client ledger identity and advance, and returns exact totals plus a short-lived preparationId. Call this first, show the preview to the user, then call create_client_invoice after explicit confirmation. It reserves the invoice number and preview for 30 minutes but creates no invoice, document, Income row, email, or payment.

Input parameters:

- `advanceApplied` (number): Verified client advance to apply against this invoice.
- `billToEmail` (string): Optional client email printed on the invoice. This does not send email.
- `clientAddress` (string): Optional billing address printed in the invoice's Bill To section.
- `clientName` (string, required): Full client or business name shown on the invoice.
- `customLineItems` (array): Optional fee/service lines. They are taxed but never marked up.
- `invoiceNumber` (string): Optional custom invoice number. ExpenseBot allocates one when omitted.
- `issueDate` (string, required): Calendar-valid invoice date in YYYY-MM-DD format.
- `markupPct` (number): Markup applied only to rebilled expense rows.
- `mentionSupportingReceipts` (boolean): When true, note on the invoice that supporting receipts are available.
- `paymentTerms` (string): Invoice due terms. Defaults to the client's billing profile or net30.
- `receiptIds` (array): Optional exact report receipt IDs. Defaults to every current report expense.
- `reportId` (string, required): Saved ExpenseBot report ID to invoice.
- `taxLabel` (string): Tax label such as HST, GST, or VAT.
- `taxPct` (number): Tax percentage applied after markup and custom line items; use 0 for no tax.

Output parameters:

- `expiresAt` (string)
- `preparationId` (string)
- `preview` (object)
- `success` (boolean)

### `create_client_invoice` (~145 tokens)

Create the exact invoice previously returned by prepare_client_invoice. This is a confirmed write: it revalidates the report snapshot and client identity, creates a private editable Google Doc plus private PDF and DOCX copies, records the issued invoice, and supersedes an older active invoice for the same report. It does not send email or create an Income row. If tax is positive, confirmTax must be true.

Input parameters:

- `confirmTax` (boolean): True only after the user confirms the displayed tax label and rate.
- `operationId` (string): Optional retry key. Reuse it after an uncertain response.
- `preparationId` (string, required): Short-lived ID returned by prepare_client_invoice.

Output parameters:

- `advanceApplied` (number)
- `artifactWarning` (string)
- `clientName` (string|null)
- `currency` (string)
- `documentUrl` (string|null)
- `docxUrl` (string|null)
- `dueDate` (string|null)
- `grandTotal` (number)
- `invoiceId` (string|null)
- `invoiceNumber` (string|null)
- `issueDate` (string|null)
- `pdfUrl` (string|null)
- `recovered` (boolean)
- `sourceReportId` (string|null)
- `status` (string)
- `success` (boolean)
- `total` (number)

### `mark_client_invoice_paid` (~130 tokens)

Mark an issued client invoice as paid after explicit confirmation. Requires a strict calendar-valid paidDate in YYYY-MM-DD format. This updates the accounts-receivable invoice record only; it never creates or moves an Income row. Record the actual payment separately or link an existing Income row.

Input parameters:

- `invoiceId` (string, required): Stable invoice ID from list_client_invoices.
- `paidAmount` (number): Optional amount received.
- `paidDate` (string, required): Calendar-valid payment date in YYYY-MM-DD format.
- `paidVia` (string): Optional payment method or source, such as bank transfer or check.

Output parameters:

- `incomeRowCreated` (boolean)
- `invoiceId` (string)
- `invoiceNumber` (string|null)
- `message` (string)
- `paidAmount` (number|null)
- `paidDate` (string)
- `paidVia` (string)
- `status` (string)
- `success` (boolean)

### `get_expense_splits` (~218 tokens)

Show how an expense was split across categories, clients, properties, or business vs personal portions. Returns the single parent payment with its nested allocation lines — split lines are never counted as separate expenses, so totals stay correct. Examples: 'how is that expense split', 'what was the business portion of that bill', 'show the allocation for this receipt'. Read-only — splits are edited in ExpenseBot's Review workspace.

Input parameters:

- `clientEmail` (string): Client account email. Accountants may use this only for an accepted ExpenseBot client.
- `dateRange` (object): Optional open-ended or closed window to search for split expenses. Supply startDate, endDate, or both; supplied bounds are inclusive YYYY-MM-DD dates.
- `limit` (number): Max parent expenses to return (default 25, max 100).
- `onlySplit` (boolean): Return only expenses with active splits (default true). Set false to inspect an unsplit Receipt ID.
- `receiptId` (string): Optional Receipt ID for one expense.

Output parameters:

- `data` (object)
- `message` (string)
- `splits` (array)
- `success` (boolean)

### `get_monthly_books_review` (~145 tokens)

Month-end summary of the user's books for one calendar month: income recorded, money spent, net, top spending categories and merchants, plus alerts for anything unusual that month. Examples: 'how did last month go', 'close out my books for June', 'monthly review', 'what did I make and spend in May'. Defaults to the last completed month. Figures come from the user's own recorded data; advisory notes are estimates, not tax advice.

Input parameters:

- `clientEmail` (string): Client account email. Accountants may use this only for an accepted ExpenseBot client.
- `period` (string): Calendar month in YYYY-MM format. Defaults to the last completed month.

Output parameters:

- `data` (object)
- `message` (string)
- `success` (boolean)

### `get_credits_refunds` (~174 tokens)

List card refunds, cashback/rewards, and statement credits that ExpenseBot has already recorded — either as negative expenses or matched against the original charge. Examples: 'did my refund come through', 'show my statement credits', 'was that return recorded'. Returns the most recent items (default 25, newest first); narrow with dateRange. Read-only: it never scans cards, changes review decisions, or adds rows.

Input parameters:

- `clientEmail` (string): Client account email. Accountants may use this only for an accepted ExpenseBot client.
- `dateRange` (object): Optional open-ended or closed window to narrow results. Supply startDate, endDate, or both; supplied bounds are inclusive YYYY-MM-DD dates.
- `limit` (number): Maximum results to return (default 25, max 100).

Output parameters:

- `credits` (array)
- `data` (object)
- `message` (string)
- `refunds` (array)
- `success` (boolean)

### `get_client_advance_balances` (~169 tokens)

Read the same per-client advance balances shown in ExpenseBot's Client advances section. Use for questions like 'how much of Acme's advance remains?', 'which client floats are still open?', or 'do I owe a client a refund?'. A negative ledger balance means money remains to refund; a positive balance means the client owes the user. Returns the existing app handoff for Refund leftover or Bill Client. Read-only: never records a refund, creates an invoice, or recomputes the ledger in model prose.

Input parameters:

- `clientEmail` (string): Client account email. Accountants may use this only for an accepted ExpenseBot client.
- `clientName` (string): Optional client name or canonical Client tag. Omit to list every open balance backed by a recorded client advance.

Output parameters:

- `balances` (array)
- `data` (object)
- `homeCurrency` (string)
- `message` (string)
- `success` (boolean)

### `get_trip_suggestions` (~188 tokens)

Show ExpenseBot's current high-confidence Trip Intelligence proposals from Review Expenses. Read-only: never groups, tags, creates reports, or writes to the spreadsheet. Each proposal returns strict YYYY-MM-DD dates, evidence, locations, and the exact Receipt IDs with expected current tags. Do not infer a client/project from geography. When nextAction is present, use exactly its group_expenses params with confirm:false, show the canonical preview, then ask for explicit confirmation before any write. Never send confirm:true from this read result alone. In accountant clientEmail mode this tool can read accepted clients but may return no executable nextAction; hand off to Review Expenses or the owner's own assistant connection to apply.

Input parameters:

- `clientEmail` (string): Client account email. Accountants may use this only for an accepted ExpenseBot client.
- `limit` (integer): Maximum high-confidence proposals to return (default 3).

Output parameters:

- `count` (integer)
- `message` (string)
- `proposals` (array): Read-only trip proposals; accepting one continues through group_expenses.
- `success` (boolean)

### `group_expenses` (~638 tokens)

Group an exact set of recorded expenses for a client, project, trip, job, or other user-named purpose. Examples: 'group my Mexico meals for client Rob', 'put these Vegas expenses under the Vegas project', or 'group these for client Rob and create a report'. The user does not need to know about tags: ExpenseBot resolves the requested name against existing groups and proposes creating one only when needed. Use exact expenseId values returned by search_expenses. A grounded preview is automatic for every bulk request; the user does not need to ask for one. First call with confirm omitted/false, show the returned exact rows, count, totals, proposed group, exclusions, and conflicts, then ask for approval. Only after explicit user approval, repeat the same operationId and selection with confirm:true. A premature confirm:true is converted to preview. When the request includes a report, set createReport:true on that confirmed group_expenses call and use its report result; do not run a separate broader create_report query. For 'without personal expenses', set excludePersonal:true; ExpenseBot removes Personal-tagged and Personal-category rows before preview so their Personal marker is never overwritten. The confirmed operation returns exact report and Bill Client links. Expenses already assigned to another ordinary report are excluded; if none remain, no duplicate report is created and the result links to Reports instead. Keep the user-facing response concise and do not add unsolicited tax or substantiation advice. Do not call check_compliance, get_report_details, or tax/deductibility tools before or after this workflow unless the user explicitly asks for that separate analysis. In user-facing prose call the destination a group, not a tag. Treat preview totals as provisional; after confirmation use only the terminal result's exact count, total, and currency without reconciling it against the preview. A returned Bill Client URL opens the reviewed billing handoff and does not m…

Input parameters:

- `approveNewGroup` (boolean): True only when the preview says a new group is required.
- `confirm` (boolean): Omit/false for preview; true only after explicit approval.
- `createReport` (boolean): Create a report from the exact eligible grouped expenses.
- `excludePersonal` (boolean): Exclude Personal-tagged and Personal-category expenses from both grouping and the exact report.
- `excludedCategories` (array): Expense categories to exclude before preview and grouping.
- `excludedTags` (array): Existing groups to exclude before preview and grouping.
- `group` (object): The user-named destination group to apply to every eligible selected expense.
- `operationId` (string, required): Stable idempotency key generated once for the preview and reused unchanged.
- `reportTitle` (string): Optional title when createReport is true; otherwise ExpenseBot derives one from the group.
- `selection` (object): Exact expenses returned by search_expenses and approved for this bounded operation.
- `status` (boolean): Read operation status using operationId.
- `undo` (boolean): Undo a completed grouping within its undo window.

Output parameters:

- `candidates` (array)
- `confirmation` (object)
- `creationStatus` (string)
- `exclusions` (object)
- `finalAnswer` (string)
- `group` (object)
- `manifest` (object)
- `message` (string)
- `operationId` (string)
- `preview` (object)
- `report` (object)
- `reportsUrl` (string)
- `requiresConfirmation` (boolean)
- `requiresNewGroupApproval` (boolean)
- `responseGuidance` (string)
- `reviewExpensesUrl` (string)
- `status` (string)
- `success` (boolean)
- `suggestedTag` (string)
- `undo` (object)

### `update_expense` (~290 tokens)

Update a single existing expense row's category, tag, merchant, or business purpose (e.g. 'recategorize expense X to Meals' or 'tag it Client – Acme'). Identify it only by the exact expenseId returned by search_expenses (the full Receipt ID from Column Q). Never use a date, displayed number, or sheet row number as expenseId. Two-phase operation: calls with confirm omitted or false return a preview of the current→proposed change and make no change. After user confirmation, a call with confirm:true applies the proposed change. If the expense is not found, search once for a current exact expenseId; never retry the same stale ID. If a business-purpose update exceeds the Notes capacity, stop and send the user to https://www.expensebot.ai/review-expenses?source=mcp instead of retrying. Only category/tag/merchant/businessPurpose are editable — amounts, dates, and notes are not editable via the assistant. Does not create or delete rows.

Input parameters:

- `confirm` (boolean): Omit or false = preview only (no write). Must be exactly true to apply the change.
- `expenseId` (string, required): Exact full Receipt ID from Column Q, returned as expenseId by search_expenses.
- `fields` (object, required): Partial update object. Include one or more of these optional keys; omit every field that should remain unchanged.

Output parameters:

- `data` (object)
- `finalAnswer` (string)
- `message` (string)
- `responseGuidance` (string)
- `success` (boolean)

### `correct_expenses` (~382 tokens)

Safely correct the category, business purpose, or explicit attendees on an exact bounded set of recorded expenses. Examples: 'categorize these as Travel', 'add Client kickoff dinner as the business purpose for these meals', or 'add Fred, Rob, and Lamar to last night's business meal'. First use search_expenses to identify the exact rows, then pass their full expenseId values. A grounded preview is automatic: first call with confirm omitted/false, show the exact count and proposed before-to-after changes, and ask once for approval. Only after explicit approval repeat the same operationId, selection, and change with confirm:true. A premature confirm:true is converted to preview. Attendee names must come explicitly from the user; never infer them. attendeeMode add preserves existing attendees, while replace substitutes only the attendee segment. Business purpose and attendees preserve the structured Notes field, including card, description, inbox, and other typed segments. Formula Notes and changes that exceed the Notes limit are skipped safely. The confirmed result reports applied/conflicted/failed counts and supports Undo. This tool does not omit duplicates, change amounts or dates, infer business context, or run broad Calendar matching. For unsupported or more than 100-row cleanup, send the user to https://www.expensebot.ai/review-expenses?source=mcp.

Input parameters:

- `change` (object): Exactly one correction. The selected type determines which matching value field is required.
- `confirm` (boolean): Omit/false for preview; true only after explicit approval.
- `operationId` (string, required): Stable idempotency key generated once for preview and reused unchanged.
- `selection` (object): Exact expenses returned by search_expenses and approved for this bounded correction.
- `status` (boolean): Read operation status using operationId.
- `undo` (boolean): Undo a completed correction within its Undo window.

Output parameters:

- `change` (object)
- `confirmation` (object)
- `finalAnswer` (string)
- `manifest` (object)
- `message` (string)
- `operationId` (string)
- `preview` (object)
- `requiresConfirmation` (boolean)
- `responseGuidance` (string)
- `reviewExpensesUrl` (string)
- `status` (string)
- `success` (boolean)
- `undo` (object)

### `search` (~87 tokens)

Search the user's ExpenseBot data — expenses, reports, and knowledge base. Returns matching items with id, title, and url. Use the returned id with the `fetch` tool to get full details. Powers Deep Research and Company Knowledge integrations.

Input parameters:

- `query` (string, required): Natural language search (e.g., 'Uber rides in March', 'Q1 client report', 'mileage Acme')

Output parameters:

- `results` (array)

### `fetch` (~192 tokens)

Fetch full details for a specific item returned by `search`. The id encodes the item type:
  • 'expense:<rowNumber>' — e.g., 'expense:42' for row 42 of the user's Expenses tab
  • 'report:<reportId>' — the alphanumeric Firestore document id from `search` or `list_reports`, e.g., 'report:FQqDglExofsyyQv7aYy4'
Always use the id exactly as returned by `search` or `list_reports` — do not invent or modify the trailing portion. Returns the full text content + metadata for the AI to cite.

Input parameters:

- `id` (string, required): Item ID from a previous `search` or `list_reports` call. Format: 'expense:<row>' (integer row number) or 'report:<reportId>' (alphanumeric Firestore doc id, ~20 chars).

Output parameters:

- `id` (string): Echoed back from the input
- `metadata` (object)
- `text` (string): Full text content for the AI to cite
- `title` (string)
- `url` (string)

## Diagnostics

Captured diagnostic sections: TLS, DNSSEC, Authorisation, Transports. The full working is on the page: https://verifymcp.io/servers/totesmagotes-mcp-server-auth/mcp#diagnostics

## Score history

- 2026-09-20: 78
- 2026-09-19: 78
- 2026-09-18: 78
- 2026-09-17: 78
- 2026-09-16: 78
- 2026-09-15: 78
- 2026-09-14: 78
- 2026-09-13: 78
- 2026-09-12: 78
- 2026-09-11: 78
- 2026-09-10: 78
- 2026-09-09: 76
- 2026-09-08: 72
- 2026-09-07: 71
- 2026-09-06: 71
- 2026-09-05: 70
- 2026-09-04: 70
- 2026-09-03: 69
- 2026-09-02: 69
- 2026-09-01: 68
- 2026-08-31: 68
- 2026-08-30: 67
- 2026-08-29: 67
- 2026-08-28: 66
- 2026-08-27: 66
- 2026-08-26: 65
- 2026-08-25: 69
- 2026-08-24: 69
- 2026-08-23: 68
- 2026-08-22: 68

## Common questions

### What is the ExpenseBot MCP server?

ExpenseBot is an MCP server listed in the public MCP registry as io.github.TotesMagotes/mcp-server-auth. Capture receipts, scan Gmail, analyze spending, and create reviewed reports from AI assistants. This page covers its hosted endpoint (https://mcp.expensebot.ai/mcp).

### Is the ExpenseBot MCP server safe to use?

ExpenseBot scores 78 out of 100 on VerifyMCP. That is a record of what we were able to check automatically, not an endorsement. The category breakdown on this page shows every signal behind the number, including the ones we could not confirm.

### What tools does the ExpenseBot MCP server expose?

ExpenseBot exposes 59 tools: search_expenses, get_spending_summary, get_deep_analytics, create_report, list_reports, and 54 more. Their descriptions and schemas cost roughly 13,521 tokens of context every time the server is loaded.

### Does the ExpenseBot MCP server require authentication?

No. We connected to ExpenseBot without credentials and it answered, so anything it exposes is reachable by anyone who knows the address.

### Is the ExpenseBot MCP server still maintained?

ExpenseBot is still listed as active in the MCP registry. We last reached this channel on 20 September 2026. Those dates come from our own scans of the registry and the channel itself, not from anything the publisher announced.

## Links

- Remote endpoint: https://mcp.expensebot.ai/mcp
- Repository: https://github.com/TotesMagotes/expensebot-mcp
- Website: https://www.expensebot.ai/mcp
- Changelog RSS feed: https://verifymcp.io/servers/totesmagotes-mcp-server-auth/mcp.xml
- Changelog JSON feed: https://verifymcp.io/servers/totesmagotes-mcp-server-auth/mcp.json
- HTML version of this page: https://verifymcp.io/servers/totesmagotes-mcp-server-auth/mcp
