Skip to main content
Developer reference

Documentation

The exact tools that power every answer. Every entry here is a real MCP tool registered on the production server — no roadmap fluff.

12
MCP tools
131
Screener columns
125
Filter params
150+
TA-Lib funcs

Tool Reference

All 12 tools the agent has access to. Names match the@mcp.tool(name=...)decorators on the production MCP server.

Dual-timeframe (daily + weekly) analysis: price action, EMA/SMA crossovers, RSI, MACD, Bollinger Bands, ADX, Ichimoku Cloud, support/resistance, pivot points, candlestick patterns, and a comparative daily-vs-weekly signal alignment report. Includes valuation, profitability, leverage, and quality scores (Piotroski, Altman Z).

Parameters

ParameterTypeRequiredDescription
tickersstring[]required1–3 symbols (e.g. ['AAPL'], ['TCS.NS', 'INFY.NS']). NSE → '.NS', BSE → '.BO'.
periodstringoptionalHistorical data range: '6mo', '1y', or '2y'. Default '1y'.

Returns

Markdown report, daily + weekly chart URLs, structured analysis data per ticker for the UI card.

Screen stocks across 131 data fields using 125 filter parameters. Supports India (~2,900 NSE/BSE stocks), US (~530 S&P 500 / NASDAQ / NYSE), and Crypto. Auto-loads new tickers on demand. Returns up to 200 matches with the full row of data per stock.

Parameters

ParameterTypeRequiredDescription
countrystringoptional'IN' (India full SEBI universe), 'US', or 'Crypto'.
sectorstringoptionalExact sector name (e.g. 'Information Technology', 'Energy').
industrystringoptionalIndustry substring (e.g. 'Banks', 'Auto Components').
filtersJSON objectoptionalFilter dict using min_X/max_X keys: min_rsi, max_pe, min_roe, min_market_cap, etc. See `get_usage_guide` for the full list.
sort_bystringoptionalSort field: rsi, pe, roe, market_cap, pct_change, volume, etc.
indexstringoptionalIndex name (e.g. 'nifty_50', 'sp500', 'nasdaq100'). Auto-sets country.
tickersstring[]optionalSpecific symbols to screen (mutually exclusive with `index`).

Returns

Up to 200 rows with 131 fields each. Includes auto-load and staleness info. Empty results trigger a progressive breakdown showing where the filter chain dropped to zero.

Typed capability tool. Computes fast vs slow moving-average crossovers across the universe in a single DB query — no sandbox code. Picks scan_crossover over run_custom_code automatically for the 'crossed above 50-SMA in last 5 days' / 'just had a golden cross' pattern. Coverage_meta in the response reports missing or insufficient-history tickers explicitly.

Parameters

ParameterTypeRequiredDescription
fast_periodintegeroptionalFast MA window. Default 50.
slow_periodintegeroptionalSlow MA window. Default 200.
directionstringoptional'above' (golden cross / cross up) or 'below' (death cross). Default 'above'.
lookback_daysintegeroptionalCrossover must have occurred within the last N trading days (1–30). Default 5.
ma_typestringoptional'sma' or 'ema'. Default 'sma'.
countrystringoptional'IN' (default), 'US', or 'Crypto'.
universestringoptional'large-cap', 'mid-cap', 'small-cap', or an index name. Limits the scan.
max_resultsintegeroptionalCap on returned matches (1–200). Default 50.

Returns

Matches sorted by recency: ticker, cross_date, fast_value, slow_value, close, days_ago. Plus coverage_meta (requested / scanned / missing_history / insufficient_history).

Unified sandbox for queries that don't fit a typed capability tool. Three modes: SQL-filter-only (fastest), SQL-JOIN against history, and SQL pre-filter + Python on the pre-loaded screener / history / single-ticker DataFrames. Pre-loaded names: pd, np, talib (150+ functions), yf, plus SCREENER_COLS / find_column helpers. A pre-flight AST validator auto-corrects known column-name typos (pct_change_5d → price_change_5d, Close → close, sma50 → sma_50, …) BEFORE the sandbox runs, so the agent doesn't burn a retry on a misspelled column.

Parameters

ParameterTypeRequiredDescription
codestring (Python)optionalPython code that assigns the result to a `results` DataFrame. Leave empty for Mode 1/2 (SQL-only).
query_namestringoptionalHuman-readable query label (shown in tool-call card).
sql_filterstringoptionalSQL WHERE clause for market_screener pre-filtering (much faster than pandas). Example: "rsi_14 < 30 AND market_cap > 5e10".
sql_querystringoptionalFull SELECT statement for JOIN queries across market_screener (alias 's') and live_quotes_history (alias 'h').
history_neededbooleanoptionalTrue if the code needs multi-day history. Default false.
daysintegeroptionalHistory days to load when history_needed=true (1–30). Default 30.
tickerstringoptionalLoads single-ticker OHLCV into `df` (yfinance, 1y daily by default).

Returns

Result DataFrame as a table, optional chart URL, plus stdout (used by the agent to learn from auto-corrected column names).

Two modes: `search` returns ranked results from DuckDuckGo; `read` extracts the article body from a URL using trafilatura (clean text, not HTML). Used by the researcher specialist for news, market commentary, URL summarization, and event-driven analysis.

Parameters

ParameterTypeRequiredDescription
querystringrequiredSearch query OR URL when mode='read'.
modestringoptional'search' (default) or 'read'.
max_resultsintegeroptionalSearch-mode result cap (1–10). Default 5.

Returns

Search mode: titles, URLs, snippets. Read mode: article text (up to ~4000 chars per page).

Runs Python code against a single ticker's OHLCV data to compute custom indicators (SuperTrend, KAMA, Keltner Channels, Fibonacci levels, etc.). Auto-renders a multi-pane chart with the indicator overlaid on price. TA-Lib (150+ functions), pandas, numpy, yfinance are pre-loaded.

Parameters

ParameterTypeRequiredDescription
tickerstringrequiredSymbol (e.g. 'AAPL', 'TCS.NS', 'BTCUSD').
codestring (Python)requiredPython code that adds columns to the pre-loaded `df` DataFrame.
indicator_namestringrequiredHuman-readable label (e.g. 'SuperTrend', 'Keltner Channels').
periodstringoptionalHistorical data range: '6mo', '1y', '2y'. Default '1y'.
plot_typestringoptional'overlay' (on price chart) or 'oscillator' (separate pane). Default 'overlay'.

Returns

Last 20 indicator values, CSV data URL, and rendered chart image.

Lists 150+ TA-Lib functions across categories: Momentum, Overlap Studies, Volatility, Volume, Cycle Indicators, Pattern Recognition. Use before writing custom indicator code to confirm whether the function already exists.

Parameters

ParameterTypeRequiredDescription
searchstringoptionalFilter indicators by substring (case-insensitive). E.g. 'rsi', 'momentum', 'cdl'.

Returns

Matching indicator names and their TA-Lib category.

Returns official constituents for 30+ Indian indices (Nifty 50, Nifty 500, Nifty Bank, Nifty Midcap 100, etc.) and US indices (S&P 500, NASDAQ 100, Dow Jones). Indian sourced from niftyindices.com; US from canonical lists. Output is ready to pass into `market_screen`.

Parameters

ParameterTypeRequiredDescription
index_namestringrequiredIndex identifier (e.g. 'nifty_50', 'nifty_bank', 'sp500'). Case-insensitive.

Returns

JSON: index, market, count, tickers[].

Lists analysis outputs the server has cached. Without a ticker: all analyzed tickers. With a ticker: every file produced by the last analysis run (charts, reports, CSVs) with sizes. Each analysis produces ~5 files: daily + weekly chart PNGs, comparative TXT, daily TXT, weekly TXT.

Parameters

ParameterTypeRequiredDescription
tickerstringoptionalSymbol. Omit to list all analyzed tickers.

Returns

Without ticker: ticker folder summaries. With ticker: detailed file listing with types and sizes.

Fetch a single file from a ticker's output folder. PNG charts render inline; TXT reports return as text; CSV returns a preview.

Parameters

ParameterTypeRequiredDescription
tickerstringrequiredTicker symbol (e.g. 'AAPL').
filenamestringrequiredExact filename or fuzzy pattern: 'daily', 'weekly_chart', 'comparative'.

Returns

PNG as inline chart image, TXT as report text, CSV as data preview.

Lazy-loaded reference doc that specialists call to get the full screener column list, code patterns for live_market queries, candlestick CDL function catalog, yfinance fallback templates, and common error recipes. Lets us keep specialist prompts compact while still giving the model full schema access on demand.

Parameters

ParameterTypeRequiredDescription
topicstringrequired'presentation', 'screening', 'multi_stock', 'custom_indicator', 'screener_schema', 'live_market', or 'all'.

Returns

Topic-specific markdown reference.

Computes all technical indicators and fundamental ratios for the given tickers and writes them to the screener cache. Usually called automatically by `market_screen` when a ticker is missing or stale.

Parameters

ParameterTypeRequiredDescription
tickersstring[]optionalSymbols to load. Defaults to refreshing the existing universe if omitted.
bg_taskbooleanoptionalRun in background. Default true.

Returns

Confirmation of load. Background tasks return immediately.

Example queries

These are routed correctly by the production planner (verified by the eval gate at 98% pass rate on the 49-query corpus).

Analyze a stock

prompt
"Analyze TCS.NS"

// Or two/three tickers side-by-side:
"Compare TCS, INFY, and HCLTECH on fundamentals and technicals"

Screen for value + quality

prompt
"Indian stocks with P/E under 20 and ROE over 25%"

Top N sorted by metric

prompt
"Top 10 NSE stocks by trading volume today"

Sector filter

prompt
"Auto component manufacturers in India with debt/equity below 1"

Temporal scan (uses scan_crossover)

prompt
"Indian large-caps that crossed above their 50-day SMA in the last 5 trading days"

Custom indicator

prompt
"Run SuperTrend on INFY with ATR period 10 and multiplier 3"

News + sentiment

prompt
"Any news on HCL Technologies in the past week"

Sector aggregation (uses run_custom_code)

prompt
"Compute z-score of RSI within each Indian sector — show the 5 most extreme outliers"

Data sources

Transparent about where every number comes from. No "real-time everything" handwaving.

Indian (NSE / BSE)

~2,900 stocks (full SEBI universe)

Groww API for live quotes (2 snapshots/day during market hours) + FMP for fundamentals + yfinance fallback for history

US (S&P 500 / NASDAQ / NYSE)

~530 stocks

FMP for fundamentals + yfinance for OHLCV + intraday quotes during market hours

Crypto

~25 major coins

yfinance / FMP for major pairs (BTC, ETH, SOL, …)

News & web

Up to 5 results/query, ~4,000 chars/article

DuckDuckGo search + trafilatura article extraction. Domain-bias toward financial sources (Moneycontrol, ET, Bloomberg, Yahoo Finance, Reuters).

Important: Indian quotes are NOT continuously live. We refresh twice per day during market hours. For an intraday tick-by-tick view, use your broker's terminal.

What we don't do (yet)

Honest gaps so nothing breaks expectations.

  • No options Greeks / F&O analytics — we cover cash-segment equities + crypto only.
  • No mutual fund / ETF holdings analysis (the screener is single-instrument).
  • No tick-by-tick streaming — Indian quotes are 2 snapshots/day.
  • Performance-vs-Nifty-50 over 60+ days currently uses yfinance fallback (the dedicated indices table ships in a follow-up).
  • The agent will say so when it hits a gap — it's built to decline rather than fabricate.

Try a query

All 12 tools, one chatbot. Free during early access.