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
query_transactions
query_transactions
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?”
| Parameter | Type | Default | Description |
|---|---|---|---|
user_id | str | — | Authenticated user |
days | int | 30 | Lookback window |
category | str | "" | Filter to one category |
limit | int | 50 | Max rows returned |
Fetches 30 days of transactions filtered to category Food. Returns total + individual transactions.
get_budgets
get_budgets
Fetches active budgets with month-to-date spend progress.
Returns: Per-budget status:
| Parameter | Type | Description |
|---|---|---|
user_id | str | Authenticated user |
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%.
scan_subscriptions
scan_subscriptions
Detects recurring merchant charges from the last 90 days. Groups by merchant + amount, flags any with 2+ occurrences.
Returns: List of
| Parameter | Type | Description |
|---|---|---|
user_id | str | Authenticated user |
{merchant, amount, occurrences, last_charge}.Example Q: “What subscriptions am I paying for?”Returns Netflix 9.90 ×3, iCloud $3.99 ×3, etc.
project_budget
project_budget
Projects month-end spending based on current daily burn rate.
Returns: Per-category
| Parameter | Type | Description |
|---|---|---|
user_id | str | Authenticated user |
{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.
- “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
get_portfolio
get_portfolio
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?”
| Parameter | Type | Description |
|---|---|---|
user_id | str | Authenticated user |
Returns total market value, total cost basis, overall return %, allocation by asset type.
get_live_price / fetch_stock_price
get_live_price / fetch_stock_price
Fetches live market prices via yfinance (stocks/ETFs) or CoinGecko (crypto).
Returns:
| Parameter | Type | Description |
|---|---|---|
symbol | str | Ticker (e.g. AAPL, BTC, ES3.SI) |
{symbol, price, change_pct} with 24h change.Example Q: “What’s Apple trading at?”Calls yfinance for real-time AAPL price + daily change %.
get_historical_prices / fetch_price_history
get_historical_prices / fetch_price_history
OHLCV historical price data via yfinance.
Returns: OHLCV series + period return %.Example Q: “How has Tesla performed over the last 6 months?”
| Parameter | Type | Description |
|---|---|---|
symbol | str | Ticker symbol |
period | str | 1w, 1mo, 3mo, 6mo, 1y, max |
Fetches 6-month OHLCV, calculates period return, returns sparkline data.
- “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
get_debts
get_debts
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?”
| Parameter | Type | Description |
|---|---|---|
user_id | str | Authenticated user |
Lists all unsettled debts where user is creditor, with amounts and names.
- “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
run_anomaly_detection
run_anomaly_detection
Runs the full anomaly detection pipeline: z-score category analysis, duplicate charge detection, and budget threshold checks.
Returns: List of
| Parameter | Type | Description |
|---|---|---|
user_id | str | Authenticated user |
{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.
- “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
fetch_stock_price
fetch_stock_price
Single stock/ETF price with daily change via yfinance. Cached with 60-second TTL.
Returns:
| Parameter | Type | Description |
|---|---|---|
symbol | str | Yahoo Finance ticker (e.g. AAPL, ES3.SI, BTC-USD) |
{symbol, price, change_pct}.fetch_crypto_price
fetch_crypto_price
Single crypto price from CoinGecko API. Cached with 60-second TTL.
Returns:
| Parameter | Type | Description |
|---|---|---|
coin_id | str | CoinGecko ID (e.g. bitcoin, ethereum, solana) |
{id, price_usd, change_24h}.- “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?”