ExpenseBot

v0.6.28
io.github.TotesMagotes/mcp-server-auth Checked 2 days ago Published 21 days ago

Receipt 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.

ParameterTypeDescription
answersExplicit answers for one operation.
confirmbooleanApprove exact preview.
operationstringPreview operation.
proposalIdstringReturned setup proposal ID.
statusbooleanRead 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.…

ParameterTypeDescription
categoriesarrayFilter by expense categories (e.g., ['Travel', 'Meals'])
clientEmailstringAccountants: accepted client email only.
countriesarrayCountry-review filter: supported country names/codes, or unknown. Never infer a country from currency or an ambiguous city.
cursorstringOpaque nextCursor returned by the previous search_expenses page. Reuse the same filters; never construct or edit this value.
dateRangeOne period variant matching user wording.
groupBystringRead-only country review; requires explicit dateRange.start/end and at most 100 matches.
hasReceiptbooleanWhen true, return only expenses with a receipt link. When false, return only expenses without one.
includePaidWithbooleanPage labels only; unavailable differs from blank. No label filter.
limitintegerResults per page (default 20, maximum 50)
maxAmountnumberMaximum expense amount
merchantsarrayFilter by merchant names (e.g., ['Uber', 'Starbucks'])
minAmountnumberMinimum expense amount
paymentStatusstringBookkeeping prefix filter before pagination; not bank settlement. Ordinary search only.
querystringOptional natural-language recall over merchant, city/location, Notes (receipt items, delivery source, payer, Business purpose), Tag and category. Deterministic case-insensitive matching, no embeddings…
tagAssignmentstringCountry review: unassigned means blank/Business; no_client means no canonical client tag, including project/trip-tagged rows. Neither implies business use.
tagsarrayFilter 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? } }.

ParameterTypeDescription
categoriesarrayOptional configured expense categories to include in the summary.
clientEmailstringAccountants: accepted client email only.
dateRangeOne period variant matching user wording.
groupBystring
metricstring
querystringNatural 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.

ParameterTypeDescription
query *stringThe analytics question to answer
dateRangeOne 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…

ParameterTypeDescription
categoriesarrayOptional configured expense categories to include in the report.
dateRangeOne period variant matching user wording.
excludePersonalbooleanExclude expenses whose Tag is Personal or whose Expense Category is Personal.
excludedCategoriesarrayExpense categories to exclude from the report.
excludedTagsarrayExisting ExpenseBot groups to exclude from the report.
recipientRolestringAccess 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…
shareWitharrayEmail addresses to share the report with
tagsarrayExisting ExpenseBot groups to include, such as a client, project, project code, property, or trip. Use list_tags first when uncertain.
titlestringCustom 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.

ParameterTypeDescription
clientEmailstringAccountants: accepted client email only.
filterstringOptional report-status filter; All returns every authorized status.
limitintegerMaximum reports to return on this page.
pageintegerOne-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.

ParameterTypeDescription
packageName *stringExact 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.

ParameterTypeDescription
analysisRequested *booleanSet 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 *stringThe report/spreadsheet ID
checkFreshnessbooleanSet 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…
clientEmailstringAccountants: accepted client email only.

share_report

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.

ParameterTypeDescription
recipients *array
reportId *string
recipientRolestringUse reviewer for report-only approval. Use accountant only for explicit ongoing accountant access.

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.

ParameterTypeDescription
analysisRequested *booleanSet 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 *stringReport 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…

ParameterTypeDescription
operationId *stringStable idempotency key generated once for preview and reused unchanged.
changeobjectExactly one correction. The selected type determines which matching value field is required.
confirmbooleanOmit/false for preview; true only after explicit approval.
selectionobjectExact expenses returned by search_expenses and approved for this bounded correction.
statusbooleanRead operation status using operationId.
undobooleanUndo 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…

ParameterTypeDescription
query *stringBrief expense-type deduction question, e.g. 'are business meals deductible?'; no account numbers or unrelated personal context.
categorystringOptional expense category to match the reference rule.
merchantstringOptional 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.

ParameterTypeDescription
query *stringSearch terms
fullAnswerbooleanSet true on the first call for complete, detailed, or step-by-step instructions. Leave false for discovery or quick-answer excerpts.
limitintegerNumber 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…

ParameterTypeDescription
filenamestringOptional filename (e.g., 'lunch_receipt.jpg')
filesToUploadarrayRequest upload URLs for every file the user provided, in one call. Returns a signedUrl + uploadRef per file; upload each, then call again with uploadRefs.
mimeTypestringMIME type of the file (default: image/jpeg)
notestringBatch-level note for every file; a file may override it. Stored in the Notes column (L).
photoobjectSingle attached receipt image or PDF supplied by ChatGPT. For multiple files or large files, use filesToUpload and uploadRefs instead.
photoBase64stringLegacy fallback for MCP clients that send one small image as complete base64 data. ChatGPT should use photo or uploadRefs instead.
tagstringBatch-level project or client tag for every row; a file may override it. Stored in the Tag column (K).
uploadRefstringSingle-file shorthand for uploadRefs. Use uploadRefs when there is more than one file.
uploadRefsarraySubmit 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…

ParameterTypeDescription
submissionIdstringExact submissionId returned by submit_receipt. Strongly preferred because it binds the result to this upload instead of an earlier receipt.
withinSecondsintegerFallback 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.

ParameterTypeDescription
date *stringExpense date (YYYY-MM-DD)
total *numberPositive amount paid or received. ExpenseBot stores a client advance as negative.
categorystringA configured Expense Account returned by list_categories. Do not invent a category.
citystringCity/location
clientNamestringClient name for a client advance, in ordinary language. ExpenseBot resolves the canonical Client – Name group.
currencystringCurrency code (default: USD)
isClientAdvancebooleanTrue only when a client supplied money in advance for expenses. Requires clientName and does not require category.
merchantstringMerchant/vendor name for an ordinary expense. Not needed for a client advance; ExpenseBot derives it from clientName.
notesstringNotes or description
subtotalnumberSubtotal before tax
taxnumberTax amount
tipnumberTip 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, ...}

ParameterTypeDescription
text *stringNatural 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.

ParameterTypeDescription
emailIds *arrayGmail message IDs to process as receipts
accountEmailstringOptional: 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.

ParameterTypeDescription
accountEmailstringOptional: which Gmail account to scan
endDatestringOptional: explicit end date (YYYY-MM-DD)
lookbackDaysintegerHow many days back to scan (default 60, max depends on subscription)
providerstringDefault Gmail.
startDatestringOptional: explicit start date (YYYY-MM-DD) instead of lookbackDays

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.

ParameterTypeDescription
date *stringTrip 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 *numberDistance traveled in the user's configured unit (miles or km)
purpose *stringBusiness purpose / description of the trip (e.g., 'Client meeting at 1234 Main St')
categorystringOverride the user's default mileage category (optional)
citystringCity (optional)
destinationstringDestination address or location (optional)
notesstringOptional user-supplied context stored with the mileage entry.
roundTripbooleanIf true, doubles the distance (return trip)
tagstringTag 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.

ParameterTypeDescription
amount *numberIncome amount (>0)
date *stringIncome 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 *stringHow 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 *stringWho paid you (client name, customer, etc.)
categorystringA category returned by list_income_categories (optional; defaults to Service income)
currencystringCurrency code (default: home currency)
descriptionstringWhat the income was for
feesnumberProcessor/transfer fees deducted
notesstring
referencestringInvoice or transaction reference
tagstringTag for client/project attribution
taxCollectednumberSales 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…

ParameterTypeDescription
bulkNotestringStep 2 only: one note (max 120 chars) prepended to every confirmed row's Notes, same as the app's 'Add note to all entries'.
confirmbooleanStep 2 only: true writes the staged rows. Omit it (with previewId absent) to parse and preview without writing.
keepBothIndexesarrayStep 2 only: preview indexes of duplicate-flagged rows the user explicitly wants to keep anyway (the app's 'Keep Both').
mimeTypestringMIME type of the file (default: image/jpeg)
paymentMethodstringFallback payment rail for rows where the parser found none (Cash, Check, Bank transfer, Wallet app, Credit/Debit card, Payment processor, or Other).
photoobjectAttached image or PDF supplied by ChatGPT for step 1. The server downloads and parses the attachment securely.
photoBase64stringLegacy fallback for MCP clients that send complete image/PDF bytes as base64. ChatGPT should use photo.
previewIdstringStep 2 only: the previewId returned by the step-1 call.
rowEditsarrayStep 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).
selectedIndexesarrayStep 2 only: preview row indexes to write. Omit to write all staged rows.
tagstringOptional 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.

ParameterTypeDescription
bulkNotestringStep 2 note prepended to confirmed rows (max 120 characters).
confirmbooleanStep 2: true writes the staged selection only after user approval.
csvContentobjectStep 1 ChatGPT attachment; securely downloaded and decoded.
csvTextstringStep 1 inline CSV/TSV/text fallback; ChatGPT should use csvContent.
keepBothIndexesarrayStep 2 duplicate indexes the user explicitly approved keeping.
paymentMethodstringFallback payment rail only when absent from the parsed row.
previewIdstringStep 2 ID returned by the unexpired preview.
rowEditsarrayStep 2 approved edits; at most 50 selected preview rows.
selectedIndexesarrayStep 2 preview row indexes to write; omit for all staged rows.
tagstringOptional 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.

ParameterTypeDescription
provider *stringAccounting destination provider. QuickBooks Online, Xero, Wave, FreeAgent (beta), or Zoho Books.
reportIdstringOptional 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…

ParameterTypeDescription
provider *stringAccounting destination provider. Agent-driven posting is currently available only for Zoho Books.
accountMappingsobjectStep 1 only: ExpenseBot category to live destination account ID overrides.
confirmbooleanStep 2 only: true posts the exact staged proposal. No other options may change.
forceRepushbooleanStep 1 only: explicitly include disclosed uncertain prior outcomes in the frozen proposal.
modestringStep 1 only (Zoho Books): automatic document treatment, paid expenses, or bills.
proposalIdstringStep 2 only: proposalId returned by the read-only preview.
reportIdstringStep 1 only: ExpenseBot report ID owned by the signed-in account.
reportingTagMappingsobjectStep 1 only: ExpenseBot tag to live destination reporting-tag option.
taxMappingsobjectStep 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.

ParameterTypeDescription
provider *stringAccounting destination provider used for the prior posting attempt.
reportId *stringExact 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.

ParameterTypeDescription
name *stringName of the new group/tag.
allowSimilarbooleanAllow creation alongside similar names only when the user explicitly chooses a new distinct group.
confirmbooleanConfirm only after the user approves the preview; a first confirm call remains preview-only.
operationIdstringServer-issued preview operation ID to confirm a staged create.
statusbooleanWhen 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.

ParameterTypeDescription
dateRangeOne period variant matching user wording.
groupBystringHow to group the breakdown
incomeTagPrefixstringOptional 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.
querystringNatural 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? } }.

ParameterTypeDescription
clientEmailstringAccountants: accepted client email only.
dateRangeOne period variant matching user wording.
querystringNatural 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…

ParameterTypeDescription
dateRangeOne period variant matching user wording.
querystringNatural language per-tag P&L question
tagPrefixstringOptional 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.

ParameterTypeDescription
actionIdstringOptional: filter to a single tool/action name
limitinteger
sinceDaysintegerOnly 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.

ParameterTypeDescription
daysintegerHow many days back to search.
limitintegerMaximum lineage events to return.
messageIdstringGmail message ID if known.
outcomestringOptional processing outcome filter.
querystringMerchant, sender, subject, invoice number, or phrase to search for, e.g. 'Blue Rocket', 'Driversnote', 'Uber receipt'.
receiptIdstringExpenseBot receipt/invoice ID if known, e.g. IR-123, RO-abc, RR-456.
threadIdstringGmail 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.

ParameterTypeDescription
dateRangeOne period variant matching user wording.
groupBystringHow to group the breakdown
querystringNatural 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.

ParameterTypeDescription
dateRangeOne period variant matching user wording.
focusstringNarrow the audit to a single category (default: all)
querystringNatural 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.

ParameterTypeDescription
expenseIdstringExact full ExpenseBot Receipt ID from Column Q
rowNumberinteger1-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.

ParameterTypeDescription
reportId *stringReport 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.

ParameterTypeDescription
feature *stringFeature or integration to check (e.g., 'Xero', 'mileage tracking', 'Plaid')

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.

ParameterTypeDescription
deltaMonthly *numberThe 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.

ParameterTypeDescription
clientName *stringThe 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…

ParameterTypeDescription
years *arrayCompleted periods; ending year for eligible tax-year accounts (2025 = 2024–25), calendar year otherwise. Max 10.
accountEmailstringOptional: which connected Gmail inbox to scan (multi-inbox users). Defaults to the primary.
confirmStartbooleanOmit or false = preview only (no scan starts). Must be exactly true to start scanning.
providerstringDefault 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.…

ParameterTypeDescription
jobIdstringOptional exact Outlook historical job ID, never guessed.
providerstringDefault 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.

ParameterTypeDescription
clientEmailstringAccountants: 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.

ParameterTypeDescription
clientEmailstringAccountants: accepted client email only.
clientNamestringOptional: exact client name (case-insensitive).
limitnumberMax invoices to return (default 25, max 100).
statusstringFilter 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.

ParameterTypeDescription
clientEmailstringAccountants: accepted client email only.
invoiceIdstringStable invoice ID from list_client_invoices. Required unless invoiceNumber is supplied.
invoiceNumberstringHuman 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.

ParameterTypeDescription
clientName *stringFull client or business name shown on the invoice.
issueDate *stringCalendar-valid invoice date in YYYY-MM-DD format.
reportId *stringSaved ExpenseBot report ID to invoice.
advanceAppliednumberVerified client advance to apply against this invoice.
billToEmailstringOptional client email printed on the invoice. This does not send email.
clientAddressstringOptional billing address printed in the invoice's Bill To section.
customLineItemsarrayOptional fee/service lines. They are taxed but never marked up.
invoiceNumberstringOptional custom invoice number. ExpenseBot allocates one when omitted.
markupPctnumberMarkup applied only to rebilled expense rows.
mentionSupportingReceiptsbooleanWhen true, note on the invoice that supporting receipts are available.
paymentTermsstringInvoice due terms. Defaults to the client's billing profile or net30.
receiptIdsarrayOptional exact report receipt IDs. Defaults to every current report expense.
taxLabelstringTax label such as HST, GST, or VAT.
taxPctnumberTax 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.

ParameterTypeDescription
advanceAppliednumber
billToEmailstring
clientAddressstring
clientNamestringIn in-app chat, the full client name shown on the invoice.
confirmTaxbooleanTrue only after the user confirms the displayed tax label and rate.
customLineItemsarray
invoiceNumberstring
issueDatestringIn in-app chat, a calendar-valid YYYY-MM-DD invoice date.
markupPctnumber
mentionSupportingReceiptsboolean
operationIdstringOptional retry key. Reuse it after an uncertain response.
paymentTermsstring
preparationIdstringShort-lived ID returned by prepare_client_invoice.
receiptIdsarray
reportIdstringIn in-app chat, the saved report ID to prepare and confirm.
taxLabelstring
taxPctnumber

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.

ParameterTypeDescription
invoiceId *stringStable invoice ID from list_client_invoices.
paidDate *stringCalendar-valid payment date in YYYY-MM-DD format.
paidAmountnumberOptional amount received.
paidViastringOptional 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.

ParameterTypeDescription
clientEmailstringAccountants: accepted client email only.
dateRangeobjectOptional open-ended or closed window to search for split expenses. Supply startDate, endDate, or both; supplied bounds are inclusive YYYY-MM-DD dates.
limitnumberMax parent expenses to return (default 25, max 100).
onlySplitbooleanReturn only expenses with active splits (default true). Set false to inspect an unsplit Receipt ID.
receiptIdstringOptional 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.

ParameterTypeDescription
clientEmailstringAccountants: accepted client email only.
periodstringCalendar 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.

ParameterTypeDescription
limitintegerClient workspaces per page; default and maximum 5.
pageintegerPage number; starts at 1. Use nextPage from the previous result.
periodstringCalendar 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.

ParameterTypeDescription
clientEmailstringAccountants: accepted client email only.
dateRangeobjectOptional open-ended or closed window to narrow results. Supply startDate, endDate, or both; supplied bounds are inclusive YYYY-MM-DD dates.
limitnumberMaximum 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.

ParameterTypeDescription
clientEmailstringAccountants: accepted client email only.
clientNamestringOptional 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…

ParameterTypeDescription
areastringCountry or city for mode area, e.g. "Denmark" or "Copenhagen, Denmark". Ambiguous places return candidates to ask about.
clientEmailstringAccountants: accepted client email only.
dateRangeobjectInclusive period to find overlapping trips; returns full trip membership, including boundary dates outside the period.
destinationstringTrip the user named, e.g. "Copenhagen". Several matches return them for clarification; never guess.
includeCandidatesbooleanDefault false: high-confidence only. True: also show uncertain candidates without saving recommendations or changing expenses.
includePossibleAdditionsbooleanDefault false. True only when the user explicitly asks to include the separate possible additions in the selection.
limitintegerResult cap (default 3, max 10), not an exhaustive list; see remaining.
modestringepisode (default): trips. area: every expense located in the area.
offsetintegerSkip this many results to page through remaining trips.
refreshbooleanRecheck 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…

ParameterTypeDescription
operationId *stringStable idempotency key generated once for the preview and reused unchanged.
approveNewGroupbooleanTrue only when the preview says a new group is required.
confirmbooleanOmit/false for preview; true only after explicit approval.
createReportbooleanCreate a report from the exact eligible grouped expenses.
excludePersonalbooleanExclude Personal-tagged and Personal-category expenses from both grouping and the exact report.
excludedCategoriesarrayExpense categories to exclude before preview and grouping.
excludedTagsarrayExisting groups to exclude before preview and grouping.
groupobjectThe user-named destination group to apply to every eligible selected expense.
replaceExistingTagsbooleanDefault false preserves existing assignments. True only after the user explicitly requests replacement; preview shows existing and proposed tags.
reportTitlestringOptional title when createReport is true; otherwise ExpenseBot derives one from the group.
selectionobjectExact expenses returned by search_expenses and approved for this bounded operation.
statusbooleanRead operation status using operationId.
undobooleanUndo 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…

ParameterTypeDescription
expenseId *stringExact full Receipt ID from Column Q, returned as expenseId by search_expenses.
fields *objectPartial update object. Include one or more of these optional keys; omit every field that should remain unchanged.
confirmbooleanOmit or false = preview only (no write). Must be exactly true to apply the change.
expectedPaidWithobject

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…

ParameterTypeDescription
operationId *stringStable idempotency key generated once for preview and reused unchanged.
changeobjectExactly one correction. The selected type determines which matching value field is required.
confirmbooleanOmit/false for preview; true only after explicit approval.
selectionobjectExact expenses returned by search_expenses and approved for this bounded correction.
statusbooleanRead operation status using operationId.
undobooleanUndo a completed correction within its Undo window.