ExpenseBot
v0.6.28Receipt ingestion, Gmail capture, expense analysis, and reviewed reports for AI-agent workflows.
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
get_setup_status
Read authoritative setup, known answers, next question and eligible actions for the current workspace. Ask only missing prerequisites; optional setup must not block a specific expense task. Unknown is not empty/complete. No client acting/writes.
complete_setup
Preview explicit setup answers; never infer settings or recipients. Show changes/access/recipients; after explicit approval confirm only proposalId + confirm:true. Owner/revision-bound; rejects changed state. Lost response: proposalId + status:true; never resend blindly. Read get_setup_status after completion. Personal Rules require validation/activation; invitations are not accepted client access. OAuth/bank/required reviews use returned screens. No financial writes or client acting.
| Parameter | Type | Description |
|---|---|---|
answers | Explicit answers for one operation. | |
confirm | boolean | Approve exact preview. |
operation | string | Preview operation. |
proposalId | string | Returned setup proposal ID. |
status | boolean | Read outcome; do not replay. |
search_expenses
Search spreadsheet expenses by category, merchant, dates, amount or tags. When hasMore, reuse nextCursor with identical filters; avoid overlapping ranges. The optional query parameter does deterministic natural-language recall over merchant, city/location, Notes (receipt items, delivery source, payer, Business purpose), Tag and category. Results include matchedFields, matchReason and exact expenseId for disambiguation. Structured filters (categories, merchants, dateRange, tags, minAmount, maxAmount) combine with the query using AND. expenseId is the exact durable Receipt ID for update_expense.…
| Parameter | Type | Description |
|---|---|---|
categories | array | Filter by expense categories (e.g., ['Travel', 'Meals']) |
clientEmail | string | Accountants: accepted client email only. |
countries | array | Country-review filter: supported country names/codes, or unknown. Never infer a country from currency or an ambiguous city. |
cursor | string | Opaque nextCursor returned by the previous search_expenses page. Reuse the same filters; never construct or edit this value. |
dateRange | One period variant matching user wording. | |
groupBy | string | Read-only country review; requires explicit dateRange.start/end and at most 100 matches. |
hasReceipt | boolean | When true, return only expenses with a receipt link. When false, return only expenses without one. |
includePaidWith | boolean | Page labels only; unavailable differs from blank. No label filter. |
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 |
paymentStatus | string | Bookkeeping prefix filter before pagination; not bank settlement. Ordinary search only. |
query | string | Optional natural-language recall over merchant, city/location, Notes (receipt items, delivery source, payer, Business purpose), Tag and category. Deterministic case-insensitive matching, no embeddings… |
tagAssignment | string | Country review: unassigned means blank/Business; no_client means no canonical client tag, including project/trip-tagged rows. Neither implies business use. |
tags | array | Filter by tags |
get_spending_summary
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? } }.
| Parameter | Type | Description |
|---|---|---|
categories | array | Optional configured expense categories to include in the summary. |
clientEmail | string | Accountants: accepted client email only. |
dateRange | One period variant matching user wording. | |
groupBy | string | |
metric | string | |
query | string | Natural language question (e.g., 'how much did I spend in March', 'top merchants this quarter') |
get_deep_analytics
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.
| Parameter | Type | Description |
|---|---|---|
query * | string | The analytics question to answer |
dateRange | One period variant matching user wording. |
create_report
Create a report for clear date/client/project/trip/category/merchant criteria. Tags group clients/projects/project codes/trips; list_tags if unclear. excludePersonal=true excludes both Personal tag and Personal expense category, matching Report Wizard. Returns summary, exact report/Bill Client links, applied filters and prefilled Report Wizard fallback for visual criteria. Group-scoped reports include matching rows not on another ordinary report. Optional recipient sharing. No unreported matches: no duplicate; explain existing Reports. Terminal accountingHandoffUrls are role-aware: use only th…
| Parameter | Type | Description |
|---|---|---|
categories | array | Optional configured expense categories to include in the report. |
dateRange | One period variant matching user wording. | |
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 accou… |
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 |
list_reports
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.
| Parameter | Type | Description |
|---|---|---|
clientEmail | string | Accountants: accepted client email only. |
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. |
request_accounting_integration
Request an exact accounting package only after checking reviewed direct/import-file destinations and finding no match. Do not use this for a listed or Beta destination or general compatibility. A confirmation-gated write: after user approval, creates one deduplicated request bound to the authenticated account and emails ExpenseBot's internal team. Does not create an integration or immediate availability. For accepted/already-recorded requests, say ExpenseBot will email an update within one week.
| Parameter | Type | Description |
|---|---|---|
packageName * | string | Exact accounting package requested by the user. |
get_report_details
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. Without checkFreshness:true, returns the stored report only. When explicitly requested together with analysisRequested:true, freshness reads canonical Google Sheets sources with a 5-second bound; if full tax-year replay is unavailable, status is unknown, not current. Never call this as a preflight or follow-up to creating, sharing, or billing from a report; those tools already return the requested result and links.
| Parameter | Type | Description |
|---|---|---|
analysisRequested * | boolean | Set true only when the user explicitly asked to inspect this report. Do not ask for or copy their full message, and do not infer consent from report creation, sharing, or billing. |
reportId * | string | The report/spreadsheet ID |
checkFreshness | boolean | Set true only when the user explicitly asks whether this Year End report is current. Requires analysisRequested:true; runs a bounded Google Sheets source check and may return unknown. Never use after… |
clientEmail | string | Accountants: accepted client email only. |
check_compliance
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.
| Parameter | Type | Description |
|---|---|---|
analysisRequested * | boolean | Set true only when the user explicitly asked for this report's compliance analysis. Do not ask for or copy their full message, and do not infer consent from report creation, sharing, or billing. |
reportId * | string | Report ID to check |
fix_compliance
Fix exact recorded expenses only after an explicit request about check_compliance findings. Get full expenseId values from search_expenses; never select all report rows or infer purpose/category/attendees. Like correct_expenses: first call always returns a grounded preview without changes, even with early confirm:true. Show exact changes, ask once, then repeat identical operationId/selection/change with confirm:true after explicit approval. Terminal result gives applied/conflicted/failed counts, status and Undo. Grouping: group_expenses. Unsupported/over-100-row cleanup: https://www.expensebot…
| Parameter | Type | Description |
|---|---|---|
operationId * | string | Stable idempotency key generated once for preview and reused unchanged. |
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. |
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. |
check_tax_deductibility
Use this when the user asks for general deduction guidance for an expense type, such as business meals or home-office expenses. Looks up reference rules using the account's tax-country/home settings and current year. A verified rule may return a percentage and reference; unverified rules return unknown/reviewRequired without a percentage. Read-only: it does not classify saved expenses, prepare a return, or determine the user's actual tax liability. Do not use for tax refunds received as income; use get_income_summary for recorded refunds. General guidance is not a tax professional's determinat…
| Parameter | Type | Description |
|---|---|---|
query * | string | Brief expense-type deduction question, e.g. 'are business meals deductible?'; no account numbers or unrelated personal context. |
category | string | Optional expense category to match the reference rule. |
merchant | string | Optional merchant name only when relevant to the expense type. |
search_knowledge
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.
| Parameter | Type | Description |
|---|---|---|
query * | string | Search terms |
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). |
submit_receipt
Process receipt images/PDFs, including 'log this', 'save this receipt', 'expense this', 'add this to my expenses' or a shared receipt/invoice photo. AI extracts vendor, amount, date, tax and category into the spreadsheet, usually in 1–3 minutes (longer for PDFs/large batches). Mixed images/PDFs are supported. Preferred upload flow (required for PDFs): call with filesToUpload for EVERY file; PUT files ONE AT A TIME to signed URLs, reporting file/count progress; then call ONCE with all uploadRefs as one batch, never once per file. photo accepts one ChatGPT image/PDF; clients without file refer…
| Parameter | Type | Description |
|---|---|---|
filename | string | Optional filename (e.g., 'lunch_receipt.jpg') |
filesToUpload | array | Request upload URLs for every file the user provided, in one call. Returns a signedUrl + uploadRef per file; upload each, then call again with uploadRefs. |
mimeType | string | MIME type of the file (default: image/jpeg) |
note | string | Batch-level note for every file; a file may override it. Stored 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 for every row; a file may override it. Stored in the Tag column (K). |
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: every uploadRef from the filesToUpload step. If any file fails validation the whole batch is rejected and nothing is processed. |
get_last_receipt_result
Read the authoritative outcome of a submit_receipt image/PDF batch using its exact ID (submissionId). Poll at the returned interval/time allowance (small batch at least 5 minutes; larger longer). Pending is normal: never blindly resubmit. found:false means pending/no terminal verdict; found:true terminal. Returns added/duplicate/skipped/held_for_review/errored per-file outcomes, exact counts and up to 10 summaries. Held files (missing details or a possible duplicate) were not added; relay only their message's next step (e.g. Files to review on Add Expenses), do not invent a missing card or dir…
| Parameter | Type | Description |
|---|---|---|
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). |
add_cash_expense
After confirmation, add a receiptless expense or client-provided expense advance to the expense sheet. Ordinary expenses: list_categories first; use a configured Expense Account. Advances: isClientAdvance=true + clientName reuses/creates the canonical client group, applies Cash advance received and writes a negative expense. Only client money provided before spending; never for vendor refunds, reimbursements, earned fees, retainers or generic deposits. Multiple/incomplete entries, refunds, tax/tip/per diem: Manual expense link from get_spreadsheet_url.
| Parameter | Type | Description |
|---|---|---|
date * | string | Expense date (YYYY-MM-DD) |
total * | number | Positive amount paid or received. ExpenseBot stores a client advance as negative. |
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) |
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 |
parse_expense
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, ...}
| Parameter | Type | Description |
|---|---|---|
text * | string | Natural language expense (e.g., "Coffee at Starbucks $6.50 yesterday") |
process_gmail_receipts
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.
| Parameter | Type | Description |
|---|---|---|
emailIds * | array | Gmail message IDs to process as receipts |
accountEmail | string | Optional: which Gmail account to use (for users with multiple linked accounts) |
scan_gmail
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. With provider:outlook, returns an access-gated screen handoff only; no scan starts.
| Parameter | Type | Description |
|---|---|---|
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) |
provider | string | Default Gmail. |
startDate | string | Optional: explicit start date (YYYY-MM-DD) instead of lookbackDays |
get_signup_link
Get the ExpenseBot signup link. Use this when the user doesn't have an account yet, or when their MCP token is missing/expired and they need to sign up or get a new token. Returns a signup URL with a 60-day free trial — no credit card required.
| Parameter | Type | Description |
|---|---|---|
utmSource | string | Optional UTM source (defaults to 'mcp') |
add_mileage_entry
Log one business trip as a calculated-value expense row. Requires a configured mileage rate (cents/km or cents/mi) and unit (mi/km). For route calculation, mileage settings, repeated trips, calendar/rideshare imports, per diem or visual review use Mileage and travel from get_spreadsheet_url.
| Parameter | Type | Description |
|---|---|---|
date * | string | Trip date (YYYY-MM-DD). Required. Use the date the user gives; for "today" send today's calendar date in their timezone. If no date was given, ask. |
distance * | number | Distance traveled in the user's configured unit (miles or km) |
purpose * | string | Business purpose / description of the trip (e.g., 'Client meeting at 1234 Main St') |
category | string | Override the user's default mileage category (optional) |
city | string | City (optional) |
destination | string | Destination address or location (optional) |
notes | string | Optional user-supplied context stored with the mileage entry. |
roundTrip | boolean | If true, doubles the distance (return trip) |
tag | string | Tag for client/project attribution (optional) |
add_income
Log exactly one confirmed income payment (cash/check/Stripe/etc.) to Income, e.g. income absent from Gmail/Plaid. Never loop over statements/exports/tables/lists. Multiple payments: add_income_from_csv for CSV/TSV/text or add_income_from_file for image/PDF; both duplicate-check, preview and require confirmation. Call list_income_categories first; use fixed tax categories. Omitted category defaults to Service income; unknown is rejected.
| Parameter | Type | Description |
|---|---|---|
amount * | number | Income amount (>0) |
date * | string | Income date (YYYY-MM-DD). Required. Use the date the user gives; for "today" send today's calendar date in their timezone. If no date was given, ask. |
paymentMethod * | string | 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. |
source * | string | Who paid you (client name, customer, etc.) |
category | string | A category returned by list_income_categories (optional; defaults to Service income) |
currency | string | Currency code (default: home currency) |
description | string | What the income was for |
fees | number | Processor/transfer fees deducted |
notes | string | |
reference | string | Invoice or transaction reference |
tag | string | Tag for client/project attribution |
taxCollected | number | Sales tax/GST/HST collected |
add_income_from_file
Import income from attached JPEG/PNG/WebP/HEIC/HEIF screenshots/images or PDF (payment/wallet/payout/bank statement; max 10 MB). Step 1: file WITHOUT confirm uses Add Income's parser and Income-tab duplicate check. Returns previewId, exact count, currency totals, rows, duplicate flags/rejections; parses only, saves nothing. Attachment is not write consent. Show rows/duplicates. Step 2: confirm:true + previewId writes only user-approved selectedIndexes/keepBothIndexes/rowEdits/tag/bulkNote. Skip flagged duplicates unless explicitly approved in keepBothIndexes. Unknown/expired previews (15 minut…
| Parameter | Type | Description |
|---|---|---|
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. |
add_income_from_csv
Use this to import the user's CSV/TSV/text income export (max 500 KB). Step 1 stages a duplicate-checked previewId without writing Income rows. Show it and obtain approval. Step 2 uses confirm:true and that previewId to write the approved rows/edits; duplicates require explicit keep approval. Unknown or expired previews never write (15-minute expiry). Return spreadsheetUrl and reviewIncomeUrl after success. Accepts user-provided attachments or inline text, not arbitrary web URLs.
| Parameter | Type | Description |
|---|---|---|
bulkNote | string | Step 2 note prepended to confirmed rows (max 120 characters). |
confirm | boolean | Step 2: true writes the staged selection only after user approval. |
csvContent | object | Step 1 ChatGPT attachment; securely downloaded and decoded. |
csvText | string | Step 1 inline CSV/TSV/text fallback; ChatGPT should use csvContent. |
keepBothIndexes | array | Step 2 duplicate indexes the user explicitly approved keeping. |
paymentMethod | string | Fallback payment rail only when absent from the parsed row. |
previewId | string | Step 2 ID returned by the unexpired preview. |
rowEdits | array | Step 2 approved edits; at most 50 selected preview rows. |
selectedIndexes | array | Step 2 preview row indexes to write; omit for all staged rows. |
tag | string | Optional client/project tag for staged or confirmed rows. |
get_accounting_integration_status
Read the owner's accounting connection/setup state, selected organization/company/business, rollout state and one connect/reconnect setupUrl. Pass an existing reportId to open that exact report's provider setup control; otherwise general Reports setup. Never posts data. Agent posting supports only Zoho Books (zoho_books). QuickBooks Online (quickbooks), Xero (xero), Wave (wave) and FreeAgent (freeagent, beta) support connection/status only with writesAuthorized=false until shared canonical planning is available.
| Parameter | Type | Description |
|---|---|---|
provider * | string | 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. |
send_report_to_accounting
Preview then post an owner's report to accounting. Step 1: provider/reportId, optional mode/mappings, NO confirm. Reads live report/destination, enforces Omit/Personal/split/date/currency rules and Zoho bank-feed checks; returns complete frozen proposal + proposalId, posts nothing. Show complete proposal and ask approval. Step 2: ONLY provider/proposalId/confirm:true, never mappings. Revalidates live state and rejects changed reports/mappings; account-bound proposal only. No client acting. Agent posting: Zoho Books (zoho_books) only. QuickBooks Online/Xero/Wave/FreeAgent cannot yet freeze/reva…
| Parameter | Type | Description |
|---|---|---|
provider * | string | Accounting destination provider. Agent-driven posting is currently available only for Zoho Books. |
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. |
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. |
get_accounting_push_status
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.
| Parameter | Type | Description |
|---|---|---|
provider * | string | Accounting destination provider used for the prior posting attempt. |
reportId * | string | Exact ExpenseBot report ID from the prior proposal or posting attempt. |
list_categories
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.
list_tags
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.
create_tag
Create a standalone group/tag without selecting or changing any expenses. The first call prepares a preview; after the user explicitly chooses to create it, send confirm:true with the returned operationId (fresh duplicate checks run). A first call with confirm:true still returns a preview. An exact canonical duplicate is a no-op; archived tags are not reactivated. Similar names are returned as choices; set allowSimilar:true only when the user explicitly chooses a distinct new group despite them. Use list_tags to inspect all groups.
| Parameter | Type | Description |
|---|---|---|
name * | string | Name of the new group/tag. |
allowSimilar | boolean | Allow creation alongside similar names only when the user explicitly chooses a new distinct group. |
confirm | boolean | Confirm only after the user approves the preview; a first confirm call remains preview-only. |
operationId | string | Server-issued preview operation ID to confirm a staged create. |
status | boolean | When true, read the verified outcome for operationId without creating or changing a tag. |
get_income_summary
Use this when the user asks about income already recorded in their ExpenseBot Income tab. Read totals; group by source, category, month, payment method or tag; filter by dateRange/incomeTagPrefix. Query supports period comparisons (e.g. 'income YTD by source', 'income this year vs last'). Returns message and data with total and optional breakdown, comparison, sampleMeta. No scanning, imports, mutations, tax returns or liability determination.
| Parameter | Type | Description |
|---|---|---|
dateRange | One period variant matching user wording. | |
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') |
get_pnl
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? } }.
| Parameter | Type | Description |
|---|---|---|
clientEmail | string | Accountants: accepted client email only. |
dateRange | One period variant matching user wording. | |
query | string | Natural language P&L question (e.g., 'P&L for Q1 2025', 'am I profitable') |
get_per_tag_pnl
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…
| Parameter | Type | Description |
|---|---|---|
dateRange | One period variant matching user wording. | |
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. |
list_income_categories
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.
get_recent_activity
Read recent MCP assistant tool calls: tool, time, arguments and success, not document processing history. Use for 'what did I do this week' or 'which tools has my assistant run'. Returns audit entries, default 20, max 100.
| Parameter | Type | Description |
|---|---|---|
actionId | string | Optional: filter to a single tool/action name |
limit | integer | |
sinceDays | integer | Only show actions from the last N days (default 7) |
trace_document
Read a receipt/invoice/forwarded email/Gmail receipt/PDF's lineage timeline: missing, skipped, income-routed, deduped or duplicate-removed documents. Not Gmail scan-job status/progress/completion (running/queued/finished/stuck): use get_scan_status; a scan is not a document.
| Parameter | Type | Description |
|---|---|---|
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. |
get_mileage_summary
Mileage totals and month/client/purpose/category breakdowns; country-aware IRS/CRA cents-per-mile/km deduction estimates. Use for mileage this year/by month/for Acme, business miles last quarter or deduction estimate. Supports YoY/MoM/QoQ comparisons. Returns message/data with totalDistance, optional deductionEstimate/breakdown/comparison/sampleMeta.
| Parameter | Type | Description |
|---|---|---|
dateRange | One period variant matching user wording. | |
groupBy | string | How to group the breakdown |
query | string | Natural language mileage question (e.g., 'mileage this year', 'miles driven for Acme client') |
get_subscription_audit
Find recurring subscriptions, duplicate charges, price increases and trial-conversion suspects in recorded expenses, optionally by cost (e.g. over $20/month). Returns message/data with recurring, duplicates, priceIncreases, trialConversions, totalMonthlyCost and sampleMeta.
| Parameter | Type | Description |
|---|---|---|
dateRange | One period variant matching user wording. | |
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') |
get_expense_by_id
Read one existing expense from the authenticated user's ExpenseBot spreadsheet. Supply the exact expenseId returned by search_expenses (Receipt ID in Column Q), or the user's specified rowNumber. Never invent an identifier. Returns sheetName, rowNumber, headers, values, labeled fields and, when available, reviewExpenseUrl. This tool does not edit, submit, delete, share, or scan anything. Also returns Paid with context (unavailable differs from blank) and typed bookkeeping paymentStatus, never bank settlement proof.
| Parameter | Type | Description |
|---|---|---|
expenseId | string | Exact full ExpenseBot Receipt ID from Column Q |
rowNumber | integer | 1-indexed sheet row (row 1 is headers, so ≥ 2) |
export_report
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.
| Parameter | Type | Description |
|---|---|---|
reportId * | string | Report ID from list_reports |
get_spreadsheet_url
Return the master Google Sheet and authenticated workspace links with labels/usage. Show only 1–2 relevant returned links. Open/view/edit spreadsheet: Sheet. Receipt added: Review expenses + Sheet; income added: Review income + Sheet. Gmail scan/connection: Scan Gmail. Bank/card connection/reconciliation: Reconcile. Configuration: Automation Hub/General Settings. Category/G/L/account codes: Category management. Client/project/trip groups: Group management. Personal classification: Personal rules. Client billing: use returned clientBillingHandoffs for the current step: manageClients (client l…
get_pricing
Get current ExpenseBot pricing for all plans (Free Trial, Standard, Pro Add-On, Deep Scan, Accountants). Useful when the user asks 'how much does this cost' or 'what's the difference between plans'. Works with or without authentication.
check_feature
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.
| Parameter | Type | Description |
|---|---|---|
feature * | string | Feature or integration to check (e.g., 'Xero', 'mileage tracking', 'Plaid') |
start_trial_link
Get a UTM-tagged signup URL for the 60-day free trial (no credit card required). Use this when an unauthenticated AI conversation wants to send the user to sign up. Returns a URL with attribution tags so we can track AI-assistant referrals.
| Parameter | Type | Description |
|---|---|---|
utmCampaign | string | UTM campaign override (default: 'ai-assistant') |
utmSource | string | UTM source override (default: 'mcp') |
whatif_afford
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.
| Parameter | Type | Description |
|---|---|---|
deltaMonthly * | number | The new recurring monthly cost being considered, in the user's home currency |
whatif_client
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.
| Parameter | Type | Description |
|---|---|---|
clientName * | string | The client's name as it appears on invoices or income rows |
mode * | string | 'late30' = shift open invoices 30 days late; 'gone' = client stops paying entirely |
whatif_tax_setaside
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'.
scan_gmail_years
provider:outlook returns a handoff; never starts. Scan completed Gmail periods for receipts. In eligible split-tax-year accounts, a number is the period's ending year (2025 = 2024–25 tax year); otherwise it is a calendar year. Use returned tax-period labels and inclusive ISO bounds. Long-running: the first eligible period starts immediately; the rest queue one at a time (each full period typically takes hours; the app may close). Preview without confirmStart (no scan starts), ask the user to confirm, then start with confirmStart:true. For recent receipts (~60 days), use scan_gmail. The in-pr…
| Parameter | Type | Description |
|---|---|---|
years * | array | Completed periods; ending year for eligible tax-year accounts (2025 = 2024–25), calendar year otherwise. Max 10. |
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. |
provider | string | Default Gmail. |
get_scan_status
Check authoritative scan status; defaults to Gmail. provider:outlook reads gated mailbox status or exact jobId, not overall processing completion. Starts require the returned screen. Gmail returns the active lock and live phase/progress shown in-app, queued or attention-needed periods, completed calendar years, and tax-period statuses with their returned labels and inclusive ISO bounds, plus exclusions and recent outcomes. Use when asked if a scan is running, finished, stuck, or what it is doing. On completion show spreadsheetUrl or reviewExpensesUrl; for setup/reconnection show gmailScanUrl.…
| Parameter | Type | Description |
|---|---|---|
jobId | string | Optional exact Outlook historical job ID, never guessed. |
provider | string | Default Gmail. |
get_statement_import_status
Check 'Did my statement finish importing?' for at most five jobs. Returns status and authenticated review link. Extraction isn't saved; read/save jobs may overlap, so counts aren't statement totals. No job found doesn't prove no import; older non-job imports are excluded. Read-only: never uploads, parses, saves, retries, or recovers.
| Parameter | Type | Description |
|---|---|---|
clientEmail | string | Accountants: accepted client email only. |
list_client_invoices
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.
| Parameter | Type | Description |
|---|---|---|
clientEmail | string | Accountants: accepted client email only. |
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). |
get_client_invoice
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.
| Parameter | Type | Description |
|---|---|---|
clientEmail | string | Accountants: accepted client email only. |
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. |
prepare_client_invoice
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.
| Parameter | Type | Description |
|---|---|---|
clientName * | string | Full client or business name shown on the invoice. |
issueDate * | string | Calendar-valid invoice date in YYYY-MM-DD format. |
reportId * | string | Saved ExpenseBot report ID to invoice. |
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. |
customLineItems | array | Optional fee/service lines. They are taxed but never marked up. |
invoiceNumber | string | Optional custom invoice number. ExpenseBot allocates one when omitted. |
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. |
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. |
create_client_invoice
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.
| Parameter | Type | Description |
|---|---|---|
advanceApplied | number | |
billToEmail | string | |
clientAddress | string | |
clientName | string | In in-app chat, the full client name shown on the invoice. |
confirmTax | boolean | True only after the user confirms the displayed tax label and rate. |
customLineItems | array | |
invoiceNumber | string | |
issueDate | string | In in-app chat, a calendar-valid YYYY-MM-DD invoice date. |
markupPct | number | |
mentionSupportingReceipts | boolean | |
operationId | string | Optional retry key. Reuse it after an uncertain response. |
paymentTerms | string | |
preparationId | string | Short-lived ID returned by prepare_client_invoice. |
receiptIds | array | |
reportId | string | In in-app chat, the saved report ID to prepare and confirm. |
taxLabel | string | |
taxPct | number |
mark_client_invoice_paid
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.
| Parameter | Type | Description |
|---|---|---|
invoiceId * | string | Stable invoice ID from list_client_invoices. |
paidDate * | string | Calendar-valid payment date in YYYY-MM-DD format. |
paidAmount | number | Optional amount received. |
paidVia | string | Optional payment method or source, such as bank transfer or check. |
get_expense_splits
Read a payment's category/client/property/business-personal allocation. Returns one parent with nested split lines; never count split lines as separate expenses. Use for 'how is this expense split' or 'business portion'. Edit splits in ExpenseBot Review workspace.
| Parameter | Type | Description |
|---|---|---|
clientEmail | string | Accountants: accepted client email only. |
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. |
get_monthly_books_review
Review one calendar month's recorded income, spending, net, top categories/merchants and unusual alerts ('monthly review', 'how did last month go', 'what did I make and spend'). Defaults to last completed month. Advisory estimates are not tax advice. closeReadiness gives recorded-book checks/Action Needed links; explain unknown coverage/limits. Never closes books or certifies tax completeness.
| Parameter | Type | Description |
|---|---|---|
clientEmail | string | Accountants: accepted client email only. |
period | string | Calendar month in YYYY-MM format. Defaults to the last completed month. |
list_client_close_readiness
Accountant-only month-end overview of accepted client workspaces. Returns page-level readiness and affected-client category counts with an authenticated Client Reports link. Use for 'how many clients need attention before month end'. No client identities, amounts, or individual items are returned; select a client in ExpenseBot to resolve items. Unavailable sources remain unknown. Each page uses the current roster; do not combine pages into a verified total.
| Parameter | Type | Description |
|---|---|---|
limit | integer | Client workspaces per page; default and maximum 5. |
page | integer | Page number; starts at 1. Use nextPage from the previous result. |
period | string | Calendar month YYYY-MM; defaults to the last completed UTC month. |
get_credits_refunds
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.
| Parameter | Type | Description |
|---|---|---|
clientEmail | string | Accountants: accepted client email only. |
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). |
get_client_advance_balances
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.
| Parameter | Type | Description |
|---|---|---|
clientEmail | string | Accountants: accepted client email only. |
clientName | string | Optional client name or canonical Client tag. Omit to list every open balance backed by a recorded client advance. |
get_trip_suggestions
Review trips from the engine behind Review Expenses Find. Default is high-confidence only; for the trip list set includeCandidates:true: real trips first (AI-reviewed order when available), second homes and regular spots grouped; page with offset while remaining > 0. Name a trip with destination (e.g. "Copenhagen"); mode:area with area lists every expense in a country or city. Show dates, recorded locations, count and uncertainty; locations are not travel or client proof. Copy exact selections to group_expenses with a user-chosen trip/client name and confirm:false, then request approval. Possi…
| Parameter | Type | Description |
|---|---|---|
area | string | Country or city for mode area, e.g. "Denmark" or "Copenhagen, Denmark". Ambiguous places return candidates to ask about. |
clientEmail | string | Accountants: accepted client email only. |
dateRange | object | Inclusive period to find overlapping trips; returns full trip membership, including boundary dates outside the period. |
destination | string | Trip the user named, e.g. "Copenhagen". Several matches return them for clarification; never guess. |
includeCandidates | boolean | Default false: high-confidence only. True: also show uncertain candidates without saving recommendations or changing expenses. |
includePossibleAdditions | boolean | Default false. True only when the user explicitly asks to include the separate possible additions in the selection. |
limit | integer | Result cap (default 3, max 10), not an exhaustive list; see remaining. |
mode | string | episode (default): trips. area: every expense located in the area. |
offset | integer | Skip this many results to page through remaining trips. |
refresh | boolean | Recheck current recorded expenses for suggested trips; never change their tags. |
group_expenses
Group exact recorded expenses for a user-named client/project/trip/job, optionally creating a report. ExpenseBot resolves existing group names and proposes creation only when needed. Use exact expenseId values from search_expenses. Preserve assignments unless explicitly asked to replace (replaceExistingTags:true). A grounded preview is automatic. First call with confirm omitted/false; show exact rows, count, totals, group, exclusions and conflicts, then ask approval. After explicit approval repeat the same operationId and selection with confirm:true; a premature confirm:true is converted to pr…
| Parameter | Type | Description |
|---|---|---|
operationId * | string | Stable idempotency key generated once for the preview and reused unchanged. |
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. |
replaceExistingTags | boolean | Default false preserves existing assignments. True only after the user explicitly requests replacement; preview shows existing and proposed tags. |
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. |
update_expense
Update a single existing expense row's category, tag, merchant or business purpose (e.g. 'recategorize expense X to Meals', 'tag it Client – Acme'). Identify it only by the exact expenseId from search_expenses (the full Receipt ID from Column Q); never a date, displayed number or sheet row number. Two-phase: calls with confirm omitted/false return a current→proposed preview and change nothing; after user confirmation, confirm:true applies it. 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…
| Parameter | Type | Description |
|---|---|---|
expenseId * | string | Exact full Receipt ID from Column Q, returned as expenseId by search_expenses. |
fields * | object | Partial update object. Include one or more of these optional keys; omit every field that should remain unchanged. |
confirm | boolean | Omit or false = preview only (no write). Must be exactly true to apply the change. |
expectedPaidWith | object |
correct_expenses
Correct category, business purpose or user-supplied attendees on exact recorded expenses. First search_expenses for full expenseId values. A grounded preview is automatic with confirm omitted/false; show exact count and before/after changes, ask approval once, then repeat identical operationId, selection and change with confirm:true. Premature confirmation returns preview. Never infer attendee names/business context. attendeeMode add preserves existing attendees; replace changes only that Notes segment. Preserve card, description, inbox and other structured Notes segments. Formula Notes/Notes…
| Parameter | Type | Description |
|---|---|---|
operationId * | string | Stable idempotency key generated once for preview and reused unchanged. |
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. |
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. |