Skip to main content
The AI advisor uses deterministic tools to query your real data. No numbers are made up — every figure in an answer is sourced from one of these tools running against your Supabase database.
Tools run server-side in Python. Claude Sonnet decides which tools to call based on your question. Independent tools run in parallel via asyncio.gather.

Cash Flow Tools

Fetches and summarises recent transactions.Returns: Total spend + breakdown by category as formatted text.Example Q: “How much did I spend on food last month?”
Fetches 30 days of transactions filtered to category Food. Returns total + individual transactions.
Fetches active budgets with month-to-date spend progress.Returns: Per-budget status: OK (< 80%), WARNING (80–100%), EXCEEDED (> 100%).Example Q: “Which budgets am I close to hitting?”
Returns all budgets with utilisation %. Flags any above 80%.
Detects recurring merchant charges from the last 90 days. Groups by merchant + amount, flags any with 2+ occurrences.Returns: List of {merchant, amount, occurrences, last_charge}.Example Q: “What subscriptions am I paying for?”
Returns Netflix 15.98×3,Spotify15.98 ×3, Spotify 9.90 ×3, iCloud $3.99 ×3, etc.
Projects month-end spending based on current daily burn rate.Returns: Per-category {budget, spent, projected, on_track}.Example Q: “Will I go over my food budget this month?”
Calculates daily spend rate, projects to month end, compares against budget limit.
Example questions handled by Cash Flow tools:
  • “How much did I spend on transport this week?”
  • “Show me my top 5 merchants this month”
  • “Compare my spending in February vs March”
  • “What’s my average monthly spend on groceries?”
  • “Am I on track with my budgets?”

Investment Tools

Fetches and summarises all investment holdings.Returns: Total portfolio value + breakdown by asset type (stocks, crypto, ETFs, etc.) with cost basis and current value.Example Q: “What’s my portfolio worth?”
Returns total market value, total cost basis, overall return %, allocation by asset type.
Fetches live market prices via yfinance (stocks/ETFs) or CoinGecko (crypto).Returns: {symbol, price, change_pct} with 24h change.Example Q: “What’s Apple trading at?”
Calls yfinance for real-time AAPL price + daily change %.
OHLCV historical price data via yfinance.Returns: OHLCV series + period return %.Example Q: “How has Tesla performed over the last 6 months?”
Fetches 6-month OHLCV, calculates period return, returns sparkline data.
Example questions handled by Investment tools:
  • “What’s my best performing holding this month?”
  • “How diversified is my portfolio?”
  • “What’s the P&L on my crypto positions?”
  • “Show me my allocation breakdown”
  • “Is MSFT up or down today?”

Debt Tools

Fetches interpersonal debts — what you owe friends and what they owe you.Returns: Net debt position + individual debt breakdown (creditor/debtor, amount, currency, status).Example Q: “Who owes me money?”
Lists all unsettled debts where user is creditor, with amounts and names.
Example questions handled by Debt tools:
  • “What’s my total credit card utilisation?”
  • “If I pay an extra $200/month towards my loan, when will I be debt-free?”
  • “How much do I owe across all my friends?”
  • “What’s my debt-to-income ratio?”

Wealth Tools

Runs the full anomaly detection pipeline: z-score category analysis, duplicate charge detection, and budget threshold checks.Returns: List of {type, severity, message, metadata} alerts.Alert types: high_spend, duplicate, budget_warning, budget_exceeded.Example Q: “Are there any unusual charges on my account?”
Runs z-score analysis on last 90 days. Returns any categories >2σ above weekly mean + duplicate charge pairs.
Example questions handled by Wealth tools:
  • “What’s my current net worth?”
  • “How has my net worth changed over the last 6 months?”
  • “What’s my savings rate this year?”
  • “Show me my assets vs liabilities”
  • “Any suspicious charges this month?”

Market Tools

Single stock/ETF price with daily change via yfinance. Cached with 60-second TTL.Returns: {symbol, price, change_pct}.
Single crypto price from CoinGecko API. Cached with 60-second TTL.Returns: {id, price_usd, change_24h}.
Example questions handled by Market tools:
  • “What’s Bitcoin trading at?”
  • “How did the S&P 500 do today?”
  • “Compare AAPL vs MSFT performance this year”
  • “What’s the SGD/USD rate?”

How tools are called

When you ask a question, the specialist (Claude Sonnet) receives your question, conversation history, and the full list of tools for your domain. It decides which tools to call — often multiple in parallel:
The Flutter chat UI shows each tool call as it fires: “Analyzing food transactions… Checking budgets… Scanning for subscriptions…”