screen_stocks
Run stock screens that combine Screener.in fundamental fields with technical price-action clauses using AND/OR logic, returning matching Indian equities with optional peer comparisons.
Instructions
Run a stock screen: Screener.in fundamental fields and/or technical (price-action) clauses, combined with AND, OR and parentheses.
Fundamental fields (Screener.in syntax, exact spelling matters): Market Capitalization, Current Price, Price to Earning, Price to book value, Return on capital employed, Return on equity, Debt to equity, Sales growth 5Years, Sales growth 3Years, Sales growth last year, Profit growth 5Years, Profit growth 3Years, Profit growth last year, Dividend yield, Pledged percentage, Net cash flow last year, Average return on equity 5Years, Average return on capital employed 5Years, Current ratio, EV / EBITDA, PEG Ratio
Technical clauses (evaluated from daily price history): 52 week low distance < 10 — % above the 52-week low 52 week high distance > 30 — % below the 52-week high RSI < 30 — 14-day RSI Price above 200 DMA — also: below, 20/50/200 DMA, "50 DMA above 200 DMA" Price vs 50 DMA < -5 — % above(+)/below(−) a DMA Volume vs 20 day average > 2 — today's volume ÷ 20-day average (spike detection)
Operators: > < >= <= =, combined with AND / OR and parentheses, e.g. "(Return on capital employed > 20 OR Return on equity > 25) AND Debt to equity < 0.5" "Return on capital employed > 15 AND (RSI < 30 OR 52 week low distance < 5)" Purely fundamental OR logic runs natively on Screener; when technical clauses sit under an OR, each alternative runs as its own screen (up to 6) and results are merged — each result lists matched_groups.
Result hygiene (on by default): min_market_cap: ₹ Cr floor added to the Screener query unless the query already has a Market Capitalization clause (0 = off) exclude_flagged: drop rows with implausible numbers (P/E < 1, >500% profit spike on a small base, profit > sales, negligible sales, sub-₹1 price) — they're listed in excluded_for_data_quality. False = keep them, flagged.
peer_relative: add each result's P/E and ROCE vs its industry median (first 20 results; slower — one industry fetch per industry).
How it runs: fundamental clauses go to Screener.in (login required);
technical clauses are then checked against up to max_candidates of those
matches. With only technical clauses, candidates come from a public NSE
index — universe (default "nifty500"; also nifty50, midcap100,
smallcap100, smallcap250, bank, it, auto, pharma, fmcg, metal, realty,
energy, defence, chemicals, ...) — so no login is needed.
sort_by: a technical metric (rsi14, pct_above_52w_low, volume_vs_20d_avg, ...) or a result column name. Default: the first technical filter.
page: 1-based page of results, limit per page (page=2 → results 26-50
with the default limit).
Returns partial=true (with a reason) if only some candidates could be checked — e.g. more fundamental matches than max_candidates.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"query": "<query>"
},
"name": "screen_stocks"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| page | No | ||
| limit | No | ||
| order | No | desc | |
| query | Yes | ||
| sort_by | No | ||
| universe | No | ||
| peer_relative | No | ||
| max_candidates | No | ||
| min_market_cap | No | ||
| exclude_flagged | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||