MCP ScannerCustom audit
All servers

mphinance/momentum-mcp

⚡ Give your AI agent a Bloomberg terminal. MCP server for stock screening, OHLCV data, technical analysis, chart generation, and financial news.

Publishermphinance community
MCP Registrynot listed
Scanned2026-11-25
Scannerv1.3.0
Methodologyv1.2
Stars 36Forks 10Last push 2026-10-21
Python 100.0%by source files the scanner reads
Code safetypartly tracedExposure6.1Prompts10.0Supply chain7.0Secrets10.0Transparency10.0
Analysis confidence94%
How much of the server the scanner could read: tools analyzed, files parsed, limits hit.
Code Safetypartly traced—

Paths from tool input into commands, SQL, files and URLs

Capability Exposure6.1/10Fair

How much power the tools give an agent over the machine

Prompt Integritynothing published yet10.0/10

Hidden instructions and poisoning in text for the model

Supply Chain7.0/10Fair

Known vulnerabilities in the packages the server uses

Secrets & Credentialsnothing published yet10.0/10

How the server reads credentials and where they can go

Behavior Transparencynothing published yet10.0/10

Whether the tools do only what their descriptions say

How far the analysis went

The scanner traces each tool from its input to the operations its code performs, and here it could not follow every path. Code Safety is shown as partly traced instead of a score: no finding there is not a clean result. The score of Capability Exposure counts only what it could follow.

  • In 19 places a tool's input is handed to a function whose name matches several definitions in the code; the scanner could not tell which one runs, so it stopped there
  • 3 of 113 tools, prompts and resources could not be followed through the code

Top risks in plain words

  • INFONo published risk: no tool declared to run commands, files, addresses or queries of the caller's choice, no known vulnerability in a production package, no advisory. Not every path through the code could be followed. Code findings appear here only after a person has verified them.

How to use it safely

Practical steps from what we found in this server. They lower the risk; they do not replace a review of the code.

  • Give it a narrowly scoped token

    Its code reads credentials or environment variables. Use a key limited to what this server needs, not your main one.

  • Keep confirmations on

    Leave your MCP client's confirmation prompt on for tools that change files, run commands or send data.

What its tools can do on your machine

The server offers 102 tools, 6 prompts, 5 resources. When an AI agent calls them, this is what their code can do on the machine where the server runs, as traced in the source. Tools that call code the scanner could not follow may do more.

Read or write filesopen, create, change or delete files
analyze, chart, compare, dividend_screen, earnings_radar, ema_stack_scan and 16 more
22 of 113
Connect to the internet or other hostssend requests or open connections
analyze, chart, compare, dividend_screen, earnings_radar, ema_stack_scan and 31 more
37 of 113
Read environment variablesoften where API keys are kept
analyze, chart, compare, dividend_screen, earnings_radar, ema_stack_scan and 16 more
22 of 113

No tool was seen to: start other programs on the machine; read passwords, tokens or keys; touch sensitive locations.

Where its requests and secrets go

Read from the names along each tool's calls, not from a run: what the code says, not every address it may reach at run time.

Hosts written in the code

The literal addresses the tools' requests name.

  • None: no request names a fixed host.
Addresses from settings

Constants or settings that start an address; the value comes from configuration.

  • None seen.
Secrets it reads

Credential-like environment variables. Give the server a key with the least access it needs.

  • None: no credential-like variable is read by the tools.

Text it brings in from outside

Text that reaches the model from outside: an instruction hidden in it can steer the agent (prompt injection). Treat what these tools return as data, not as orders.

  • files22 tools · analyze, chart, compare +19
Reads private data22 tools
Takes text from outside0 tools
Can send data out0 tools

Not all three are present in the tools the scanner traced.

Tool annotations

No tool declares MCP annotations (readOnlyHint, destructiveHint and the rest). Clients use them to decide what to confirm; directories such as Anthropic's and OpenAI's ask for them.

Tools, prompts and resources (113: 102 tools, 6 prompts, 5 resources)

Open a row for its full description. Chips show what its code can reach, and which risky capability its own description declares.

fnprompt
No description.
momentum_breakoutsprompt Find and read the strongest momentum breakouts right now.
Find and read the strongest momentum breakouts right now.
oversold_qualityprompt Hunt for oversold names that are still high quality.
Hunt for oversold names that are still high quality.
rank_by_factorprompt Rank a market by a composite factor and read the leaders.
Rank a market by a composite factor and read the leaders.
read_symbolprompt Give a full plain-language chart read for one symbol.
Give a full plain-language chart read for one symbol.
trading_assistantprompt Start a trading analysis session with access to institutional-grade tools.
Start a trading analysis session with access to institutional-grade tools.
fields_resourceresource The full field catalog (id, label, group, type, unit).
The full field catalog (id, label, group, type, unit).
fnresource
No description.
get_welcomeresource Welcome message and overview of the Momentum trading tools platform.
Welcome message and overview of the Momentum trading tools platform.
operators_resourceresource The filter operator reference.
The filter operator reference.
presets_resourceresource Every preset scan and factor preset, in full.
Every preset scan and factor preset, in full.
analyzetool Read a symbol's chart: a structured, multi-timeframe technical analysis.FilesNetworkEnv varsoutside text
Read a symbol's chart: a structured, multi-timeframe technical analysis.

    Composes TradingView's own fields into trend, momentum, range, and rating
    reads plus a list of plain-language signals, so an agent can narrate "what
    the chart is saying" without eyeballing it. The read is multi-timeframe in a
    single call: RSI and MACD bias on the 1h, 4h, 1d, 1w, and 1m at once, with an
    alignment verdict, so nobody has to swap timeframes. Pure TradingView data.

    Returns {ticker, close, change, trend, momentum, multi_timeframe, range,
    rating, performance, signals[], summary}.
analyze_breadthtool Get a comprehensive market breadth health score (0-100).
Get a comprehensive market breadth health score (0-100).
    Synthesizes equal-weight vs cap-weight trends, new highs/lows, and volatility term structure.
analyze_options_setuptool VoPR™ engine: composite realized vol (4 estimators), VRP ratio,
VoPR™ engine: composite realized vol (4 estimators), VRP ratio,
    Black-Scholes Delta/Theta, A-F grade. Use when you need a specific
    DTE/strike analysis. Pass budget for strike recommendations.
analyze_pairtool Analyze a pair of stocks for statistical arbitrage.
Analyze a pair of stocks for statistical arbitrage.
    Computes correlation, ratio, and Z-score of the spread between two assets.
analyze_recent_gaptool Score the most recent overnight gap reaction (0-100) for a specific ticker.
Score the most recent overnight gap reaction (0-100) for a specific ticker.
    Evaluates gap size, volume expansion, price hold, and fundamental quality to grade the trade setup.
analyze_scenariotool Generate bull/base/bear scenarios for a ticker based on a catalyst (e.g. 'earnings', 'tariffs').
Generate bull/base/bear scenarios for a ticker based on a catalyst (e.g. 'earnings', 'tariffs').
    Provides price targets and probabilities based on technical volatility and trend.
analyze_technicalstool Compute 24 technical indicators: EMA 8/21/34/55/89, SMA 50/100/200,
Compute 24 technical indicators: EMA 8/21/34/55/89, SMA 50/100/200,
    RSI(14), MACD(12,26,9), ADX(14), ATR(14), Williams %R, Stochastic,
    Bollinger Bands, CCI(20). Returns latest readings + analysis summary.
analyze_uptrend_participationtool Measure market participation in structural uptrends.
Measure market participation in structural uptrends.
    Scans all 11 SPDR sectors and major indices to see what % are trading above their EMA50 and EMA200.
backtest_strategytool Backtest a trading strategy on historical data. 6 presets:
Backtest a trading strategy on historical data. 6 presets:
    ema_crossover, rsi_bounce, macd_momentum, bollinger_squeeze,
    golden_cross, ema_stack_breakout. Returns Sharpe, win rate, CAGR, etc.
calculate_position_sizetool Calculate risk-based position size using Fixed Fractional, ATR, or Kelly methods.
Calculate risk-based position size using Fixed Fractional, ATR, or Kelly methods.
    Answers 'how many shares/contracts should I buy?' given account size and risk tolerance.
charttool Get a live TradingView chart for a symbol: deep link + embeddable widget.FilesNetworkEnv varsoutside text
Get a live TradingView chart for a symbol: deep link + embeddable widget.

    Resolves the symbol to its exchange-prefixed ticker, then returns a chart
    URL plus a ready-to-paste TradingView Advanced Chart widget (config + HTML).
    Pure TradingView. interval accepts "1m".."1mo" friendly forms; theme is
    "dark" or "light".

    Returns {symbol, interval, chart_url, widget:{script,config}, embed_html}.
comparetool Put several symbols side by side on the same columns.FilesNetworkEnv varsoutside text
Put several symbols side by side on the same columns.

    tickers: e.g. ["NVDA","AMD","AVGO"]. columns defaults to a broad price +
    performance + valuation set. Returns the aligned rows and a rendered table.
detect_bubble_risktool Assess current market euphoria and bubble risk (0-15 score).
Assess current market euphoria and bubble risk (0-15 score).
    Evaluates price extension from 200d MA, VIX complacency, valuation (PE), speculative volume, and meme stock fever.
detect_ftdtool Detect Follow-Through Days (FTDs) on major indices to confirm market bottoms.
Detect Follow-Through Days (FTDs) on major indices to confirm market bottoms.
    Identifies the start of a new bull market using O'Neil price/volume expansion rules.
detect_macro_regimetool Detect the current structural market regime (Growth, Inflation, Deflation, or Goldilocks).
Detect the current structural market regime (Growth, Inflation, Deflation, or Goldilocks).
    Uses cross-asset ratios like RSP/SPY, TLT/SHY, and XLY/XLP to identify macro shifts.
detect_market_toptool Detect market topping signals using distribution days and leadership trends.
Detect market topping signals using distribution days and leadership trends.
    Uses O'Neil distribution day counting and defensive sector rotation analysis.
detect_themestool Identify trending market themes by clustering thematic ETF performance.
Identify trending market themes by clustering thematic ETF performance.
    Detects which groups (AI, Biotech, Energy, etc.) are moving together with the most momentum.
dividend_screentool Find high-quality dividend-paying stocks ranked by a Dividend Quality Score.FilesNetworkEnv varsoutside text
Find high-quality dividend-paying stocks ranked by a Dividend Quality Score.

    Surfaces income ideas with a composite score (dq_score, 0-100) that weights
    three things simultaneously: how high the yield is, how long the dividend has
    grown consecutively (quality and reliability signal), and whether the payout
    ratio is in a healthy range (not so low it risks being cut, not so high it
    strains the balance sheet).

    Score components:
      yield component   30%: yield up to 10% maps to full credit
      growth streak     40%: consecutive years of dividend growth / 50 (capped)
      payout health     30%: ideal 20-75%, penalized outside that band
    dq_score is the percentile rank (0-100) of the raw composite in the sample.

    Category labels (based on consecutive years of dividend growth):
      Aristocrat   25+ consecutive years of growth (S&P Dividend Aristocrat tier)
      Achiever     10-24 years
      Grower       1-9 years
      Payer        paying dividends but no confirmed growth streak

    market:          one of scan_list_markets() ids (america works best; fundmental data
                     is sparse for crypto/forex/futures).
    min_yield:       minimum dividend yield % to qualify (default 1.0).
    min_years_growing: return only stocks with at least this many consecutive years
                     of dividend growth (0 = all payers; 10 = Achievers+; 25 = Aristocrats).
    filters:         optional extra filters (e.g. market_cap_basic > 1e9).
    limit:           rows to sample (default 500).
    top:             max stocks to return (default 50).
    include_otc:     scan OTC too (default False).

    Returns {market, universe, sample, min_yield, count, avg_yield,
    by_category:{Aristocrat, Achiever, Grower, Payer},
    by_sector:[{sector, count, avg_yield, aristocrats, achievers}],
    stocks:[{name, close, change, sector, market_cap_basic, div_yield,
    years_paying, years_growing, payout_ratio, roe, category, dq_score, perf_1m}]}.
earnings_radartool Find stocks with earnings announcements in the next N days.FilesNetworkEnv varsoutside text
Find stocks with earnings announcements in the next N days.

    Earnings are the biggest single-day catalyst. This tool builds a forward
    radar of names about to report, grouped by timing bucket (today, this_week,
    later) and sector, with the context a trader needs before the bell:
    RSI, ATR% (a proxy for the expected intraday range), 1-month performance,
    and market cap.

    Use it the morning before the market opens to build an earnings watch-list.
    Pair with sector_rotation to see which sectors have the most catalysts
    coming, or with analyze to drill into the setups you care about most.

    market:  one of scan_list_markets() ids (america, crypto, ...).
    horizon: days ahead to look for earnings (default 7 = one week). Use 1 for
             today-only, 14 for a two-week forward radar.
    filters: optional extra filters (e.g. market_cap_basic > 1e9 to skip micro-
             caps, or RSI < 40 for oversold pre-earnings ideas).
    limit:   rows to pull from the market (default 1000). Raise to 1000 if you
             want broader small-cap coverage.
    top:     max stocks to return in the stocks list (default 50).

    Returns {market, universe, sample, horizon_days, count,
    by_bucket:{today,this_week,later},
    by_sector:[{sector,count,today,this_week,later}],
    stocks:[{name,close,change,sector,market_cap_basic,days_to_earnings,
    bucket,rsi,atrp,perf_1m}]}.
ema_stack_scantool Rank stocks by EMA/SMA stack alignment: a bull-stack breadth indicator.FilesNetworkEnv varsoutside text
Rank stocks by EMA/SMA stack alignment: a bull-stack breadth indicator.

    Checks four moving-average alignment conditions for each stock:
      1. Price  above EMA8   (near-term momentum)
      2. EMA8   above EMA21  (fast EMAs in bull order)
      3. EMA21  above SMA50  (medium-term trend aligned)
      4. SMA50  above SMA200 (golden-cross long-term stack)

    stack_score is the count of conditions that hold (0-4). A score of 4
    is a full bull stack: price is above every MA and each MA is above the
    next slower one. A score of 0 is a full bear stack.

    The distribution doubles as a market breadth read: when most stocks are
    at 3-4 the broad trend is healthy; a slide to mostly 0-1 signals broad
    internal deterioration. pct_full_bull is a single summary number.

    Use min_stack=4 to screen for stocks in the cleanest uptrend; combine
    with a `filters` market-cap floor to keep the list investable.

    market:    one of scan_list_markets() ids.
    min_stack: return only stocks at or above this score (0 = no filter;
               3 = bull-bias; 4 = full bull stack only).
    filters:   optional extra filters (e.g. a market-cap floor).
    limit:     rows to sample (default 500).
    top:       max stocks to return (default 50).
    include_otc: scan OTC too (default False).

    Returns {market, universe, sample,
    distribution:{0:n, 1:n, 2:n, 3:n, 4:n, none:n},
    avg_stack_score, pct_full_bull, pct_full_bear,
    top:[{name, close, change, sector, market_cap_basic, rsi,
    stack_score, ma_alignment, conditions_available,
    price_vs_ema8, ema8_vs_ema21, ema21_vs_sma50, sma50_vs_sma200}]}.
etf_briefingtool Pre-market institutional briefing: top ETF buys and sells, multi-providerNetwork
Pre-market institutional briefing: top ETF buys and sells, multi-provider
        convergence, accumulation streaks, notable new option positions.
etf_divergencestool Cross-fund divergences: where different institutional funds traded the SAMENetwork
Cross-fund divergences: where different institutional funds traded the SAME
        ticker in OPPOSITE directions. Disagreement between managers, not consensus.
etf_fund_detailtool One ETF's detail: top holdings, options count, AUM. e.g. ARKK, AVUV, NVDY.Network
One ETF's detail: top holdings, options count, AUM. e.g. ARKK, AVUV, NVDY.
etf_global_statstool Coverage stats: funds tracked, unique underlyings, options contracts,Network
Coverage stats: funds tracked, unique underlyings, options contracts,
        and today's new positions and exits.
etf_holdings_changestool Raw institutional position changes, filterable by provider ('ARK Invest',Network
Raw institutional position changes, filterable by provider ('ARK Invest',
        'Avantis', 'YieldMax'), fund symbol, or direction. This is the primitive the
        other signal tools are computed from.
etf_income_fund_detailtool One income fund's full book: call coverage, moneyness, options overlay.Network
One income fund's full book: call coverage, moneyness, options overlay.
etf_income_overviewtool Option-income funds by structure: covered-call, synthetic, leap-proxy, swap.Network
Option-income funds by structure: covered-call, synthetic, leap-proxy, swap.
etf_institutional_flowtool Aggregate accumulation/distribution: all active-equity funds blended intoNetwork
Aggregate accumulation/distribution: all active-equity funds blended into
        one AUM-weighted portfolio, showing what institutions are net buying.
etf_institutional_trendtool Per-ticker institutional accumulation/distribution trend across day, weekNetwork
Per-ticker institutional accumulation/distribution trend across day, week
        and month horizons at once.
etf_layering_patternstool Layering: 3+ independent stock-pickers opening the SAME new position withinNetwork
Layering: 3+ independent stock-pickers opening the SAME new position within
        days of each other. Needs the full cross-fund panel over time to see at all.
etf_list_fundstool All 71 tracked funds with holdings counts and top positions.Network
All 71 tracked funds with holdings counts and top positions.
etf_list_tickerstool The most widely-held underlyings across all tracked funds (~2,270 total).Network
The most widely-held underlyings across all tracked funds (~2,270 total).
etf_options_listingstool CBOE daily diff: newly optionable stocks and new weekly listings.
CBOE daily diff: newly optionable stocks and new weekly listings.
etf_sector_flowtool Sector-level institutional inflows and outflows from fund holdings.
Sector-level institutional inflows and outflows from fund holdings.
        NOTE: this is fund positioning — `get_sector_flow` (no prefix) is a different
        dataset, options premium by sector.
etf_signal_performancetool Historical backtest performance of TickerTrace conviction signals.Network
Historical backtest performance of TickerTrace conviction signals.

        The published track record — the one asset here a fork cannot obtain,
        because forking gets the code from today forward, not the history that
        makes the score mean anything.
etf_signalstool Conviction-scored institutional buy/sell signals from daily ETF holdings
Conviction-scored institutional buy/sell signals from daily ETF holdings
        changes. `category` restricts to 'active-equity' (ARK, Avantis, Sprott) or
        'option-income' (YieldMax, Kurv, REX, Roundhill).
etf_stock_activitytool Everything institutional for one stock: which funds hold it, how weightsNetwork
Everything institutional for one stock: which funds hold it, how weights
        moved, and its accumulation/distribution trend.
extract_article_texttool Extract the full-text body of a news article. Strips ads and nav.
Extract the full-text body of a news article. Strips ads and nav.
fetch_ticker_newstool Fetch recent financial news headlines for a stock from RSS feeds.Network
Fetch recent financial news headlines for a stock from RSS feeds.
find_best_to_buytool Auto-find the best directional option to BUY. Reads technicals
Auto-find the best directional option to BUY. Reads technicals
    (RSI, EMA stack, MACD) to determine bullish/bearish bias, then scans
    21-60 DTE for optimal contract. Returns top 3 with direction rationale.
find_best_to_selltool Auto-find the best puts and calls to SELL. Scans 7-45 DTE across
Auto-find the best puts and calls to SELL. Scans 7-45 DTE across
    multiple strikes. Scores on RoC, VoPR grade, theta efficiency, delta
    sweet spot. Returns top 3 puts + top 3 calls.
fntool
No description.
fundamentalstool Read a symbol's fundamentals: valuation, profitability, growth, leverage, dividends.FilesNetworkEnv varsoutside text
Read a symbol's fundamentals: valuation, profitability, growth, leverage, dividends.

    The counterpart to `analyze()`, which is deliberately technicals-only. This is the
    fundamentals half of the same symbol, composed from TradingView's own reported financials
    (same data `scan_screen`/`scan_compare` can already pull field-by-field, packaged here into a single
    narratable read plus plain-language flags).

    A missing field (TradingView carries no fundamentals for some ETFs, SPACs, and non-US
    listings) is left out of its section rather than shown as zero. A `0.0` P/E and a
    genuinely absent one must never look the same.

    Returns {ticker, sector, industry, valuation, profitability, growth, leverage, dividends,
    earnings, signals[], summary}.
gap_scannertool Find stocks that opened with a significant gap and track intraday fill progress.FilesNetworkEnv varsoutside text
Find stocks that opened with a significant gap and track intraday fill progress.

    A gap occurs when a stock opens above (gap up) or below (gap down) the
    previous session's close. Gaps are high-conviction setups: when the gap
    holds, it signals momentum continuation ("gap and go"); when it fills, it
    signals mean reversion back to the prior close.

    For each qualifying gap this tool reports:
      gap:          the opening gap % (positive = gap up, negative = gap down)
      prev_close:   yesterday's close, back-calculated from open and gap%
      gap_fill_pct: how much of the opening gap the current price has retraced.
                    0% = price still at the open; 100% = fully filled back to
                    yesterday's close; >100% = price overshot past the gap level.
      is_holding:   True when gap_fill_pct < 25 (gap still largely intact)
      is_filled:    True when gap_fill_pct >= 100 (full gap fill occurred)
      rvol:         relative volume (conviction read on the gap)

    market:      one of scan_list_markets() ids.
    min_gap_pct: minimum absolute gap % to qualify (default 1.0). Use 2.0
                 for larger, cleaner gaps; 0.5 to catch small gaps too.
    filters:     optional extra filters (e.g. a market-cap floor).
    limit:       rows to sample (default 500).
    top:         max stocks to return per side, gap_up and gap_down (default 50).

    Returns {market, universe, sample, min_gap_pct, count,
    gap_up_count, gap_down_count,
    by_sector:[{sector, count, gap_up, gap_down}],
    gap_up:[{name, close, open, change, sector, gap, prev_close, gap_fill_pct,
    is_holding, is_filled, volume, rvol}],
    gap_down:[same shape]}.
generate_alpha_cardtool Generate a shareable Alpha Card — a branded HTML analysis card.
Generate a shareable Alpha Card — a branded HTML analysis card.
    Combines technicals + TradingView consensus into a sleek visual.
    Perfect for sharing trade setups on Discord/Twitter.
generate_charttool Generate a candlestick chart with EMA overlays (8/21/34/55/89).
Generate a candlestick chart with EMA overlays (8/21/34/55/89).
    Returns base64-encoded PNG and file path.
get_alpha_signalstool Get recent alpha signals detected by the background signal factory.
Get recent alpha signals detected by the background signal factory.

    9 signal types: RSI_CROSS_UP_70, RSI_CROSS_DOWN_70, RSI_CROSS_UP_30,
    RSI_CROSS_DOWN_30, MACD_CROSS_UP, MACD_CROSS_DOWN, VOLUME_SPIKE,
    EMA_STACK_BREAKOUT, ADX_TREND_ENTRY.

    Signals are auto-detected every 5 min (market open) / 30 min (closed)
    across 24 popular tickers. Filter by ticker and/or signal type.
get_earnings_calendartool Weekly earnings calendar — who reports this week.
Weekly earnings calendar — who reports this week.
get_earnings_flowtool Pre-earnings options flow — institutional positioning ahead of earnings.
Pre-earnings options flow — institutional positioning ahead of earnings.
get_exposure_recommendationtool Get a market exposure recommendation (0-100% capital deployment).
Get a market exposure recommendation (0-100% capital deployment).
    Synthesizes VIX, flow, distribution days, and trend confirmation into a single capital deployment ceiling.
get_fundamentalstool Get fundamental data: P/E, EPS, revenue growth, profit margin,
Get fundamental data: P/E, EPS, revenue growth, profit margin,
    short interest, analyst targets, earnings dates, market cap.
get_gex_overviewtool Gamma Exposure (GEX) for SPY/QQQ/IWM. Positive = pinning/calm.
Gamma Exposure (GEX) for SPY/QQQ/IWM. Positive = pinning/calm.
    Negative = trending/volatile. GEX flip level = regime boundary.
get_historical_datatool Fetch OHLCV historical price data for a stock.
Fetch OHLCV historical price data for a stock.

    Args:
        ticker: Stock symbol (e.g. "AAPL").
        period: 1d, 5d, 1mo, 3mo, 6mo, 1y, 2y, 5y, 10y, ytd, max.
        interval: 1m, 5m, 15m, 30m, 1h, 1d, 1wk, 1mo.
get_learned_patternstool Get auto-extracted patterns from past backtests with win rates.
Get auto-extracted patterns from past backtests with win rates.
get_market_environmenttool Get a cross-asset market environment report.
Get a cross-asset market environment report.
    Snapshots performance for Equities, Bonds, Commodities, Currencies, and Crypto to identify macro rotation.
get_market_pulsetool AI-generated market sentiment with options flow score (-7 to +7).
AI-generated market sentiment with options flow score (-7 to +7).
    +5 to +7 = extremely bullish. -5 to -7 = panic-level bearish.
get_market_statstool Market-wide put/call ratios and sentiment indicators.
Market-wide put/call ratios and sentiment indicators.
get_momentum_pulsetool Calculate real-time momentum scores (0-100) for each ticker.
Calculate real-time momentum scores (0-100) for each ticker.

    Uses EMA stack alignment, RSI sweet-spot, and ADX strength.
    Score >70 = strong bullish momentum, <30 = momentum exhausted.
    Defaults to the 24 pre-warmed tickers if none specified.
get_politician_tradestool Congressional stock trading disclosures.
Congressional stock trading disclosures.
get_put_call_ratiostool Put/call ratios for SPY, QQQ, IWM (or any ticker).
Put/call ratios for SPY, QQQ, IWM (or any ticker).
    Below 0.7 = complacent. Above 1.0 = elevated fear (contrarian bullish).
get_sec_filingstool SEC EDGAR filing index straight from the primary source: the
SEC EDGAR filing index straight from the primary source: the
    recent-events sweep. `forms` narrows to types like ["8-K", "10-Q"].
get_sec_financialstool Multi-period financials from SEC XBRL, including the accrual gap
Multi-period financials from SEC XBRL, including the accrual gap
    (net income minus operating cash flow: positive means earnings are
    accrual-driven rather than cash-backed).
get_sector_flowtool Sector-by-sector options flow with bullish/bearish sentiment.
Sector-by-sector options flow with bullish/bearish sentiment.
    Compare flows: all red = real selling, mixed = rotation.
get_shares_outstandingtool Cover-page share count straight from the 10-Q/10-K filing, not an
Cover-page share count straight from the 10-Q/10-K filing, not an
    aggregator's derived figure. Flags an implausible diluted count instead
    of silently returning it.
get_signalstool Breakout and continuation signals with technical indicator data.
Breakout and continuation signals with technical indicator data.
get_stakes_heldtool AS-FILER 13D/13G: stakes this company holds in OTHER public companies
AS-FILER 13D/13G: stakes this company holds in OTHER public companies
    (e.g. GME's 9.8% stake in eBay), not who owns this ticker.
get_track_recordtool Get the full conviction journal track record with win/loss stats.
Get the full conviction journal track record with win/loss stats.
get_tv_analysistool Get TradingView 26-indicator technical consensus for a ticker.
Get TradingView 26-indicator technical consensus for a ticker.

    Returns STRONG_BUY/BUY/NEUTRAL/SELL/STRONG_SELL with buy/sell/neutral
    counts for both oscillators and moving averages.

    **Screener selection** — TradingView partitions symbols by asset class.
    Pick the right ``screener`` for the instrument or leave it ``None`` to
    auto-detect from the symbol shape:

    | Asset class            | Example symbols                | screener |
    |------------------------|--------------------------------|----------|
    | US equities            | NVDA, AAPL, TSLA               | america  |
    | Forex / commodity CFDs | XAUUSD, EURUSD, GBPUSD, USDJPY | cfd      |
    | Crypto                 | BTCUSD, ETHUSD, SOLUSD         | crypto   |
    | Futures (yfinance)     | GC=F, CL=F, ES=F               | america  |
    | Futures (TradingView)  | GC1!, ES1!, CL1!               | cfd      |

    Args:
        ticker: Symbol as shown above.
        interval: 1m, 5m, 15m, 1h, 4h, 1d (default), 1w, 1M.
        exchange: Exchange within the screener. Defaults to NASDAQ.
            Ignored when ``screener`` is set explicitly.
        screener: ``"america"``, ``"cfd"``, or ``"crypto"``. ``None``
            (default) auto-detects from the symbol.
get_unusual_activitytool Unusual options flow feed — institutional trades, premium, conviction.
Unusual options flow feed — institutional trades, premium, conviction.
    High conviction = $500K+ premium, unusual volume vs OI.
list_factor_presetstool List the composite factor-scoring presets (Momentum, Value, Quality, ...).
List the composite factor-scoring presets (Momentum, Value, Quality, ...).

    Each is a weighted, direction-aware blend of fields. Run one with
    `scan_run_factor_preset` to rank a market by that factor.
list_marketstool List the markets the screener can target.
List the markets the screener can target.

    Returns each market's id (use as the `market` arg elsewhere), a label, and
    its kind. Covers US stocks, crypto, forex, futures, bonds, and CFDs.
list_operatorstool List the filter operators, what value each expects, and what it means.
List the filter operators, what value each expects, and what it means.

    Note the cross-field operators: a value may be another field id, so
    {"field":"SMA50","op":"crosses_above","value":"SMA200"} is a golden cross
    and {"field":"close","op":">","value":"VWAP"} is price over VWAP.
list_presetstool List the one-click preset scans (id, name, description, market, group).
List the one-click preset scans (id, name, description, market, group).

    47 presets across general scans and the SIGNALS / MOMENTUM / TREND /
    MULTI-TIMEFRAME signal groups. Pass `group` to filter, e.g. "Momentum".
    Run one with `scan_run_preset`.
list_strategiestool List all saved custom strategies.
List all saved custom strategies.
log_convictiontool Log a trade conviction to the journal. Direction: bullish/bearish/neutral.
Log a trade conviction to the journal. Direction: bullish/bearish/neutral.
    Conviction: high/medium/low. Include a thesis for future review.
    Entry price is fetched live automatically; entry_price is accepted but unused.
lookup_symboltool Fetch one symbol's row by ticker (e.g. "NVDA", "BTCUSD").FilesNetworkEnv varsoutside text
Fetch one symbol's row by ticker (e.g. "NVDA", "BTCUSD").

    Matches case-insensitively on the `name` field. Returns the single row with
    the requested columns (or a broad default set), or an error if not found.
market_breadthtool Market breadth indicators: advancers/decliners, % above key MAs, RSI distribution.FilesNetworkEnv varsoutside text
Market breadth indicators: advancers/decliners, % above key MAs, RSI distribution.

    A single-call health read of the market (or a filtered slice of it). Useful
    for quickly answering "is the market broadly advancing or declining?" and
    "how stretched is sentiment right now?" before drilling into individual names.

    market:  one of scan_list_markets() ids.
    filters: optional extra filters, e.g. a market-cap floor to focus on a tier.
    limit:   rows to sample (default 500; the full scan is often 7000+ stocks).
    include_otc: scan OTC too (default False). Breadth is a PERCENTAGE over the
                 universe, so this matters more here than in a top-N list: a
                 third of america is sub-penny shells, and letting them vote
                 moves every ratio this tool reports.

    Returns {market, universe, sample, advancers, decliners, unchanged, ad_ratio,
    pct_advancers, pct_decliners, avg_change, pct_above_sma50, pct_above_sma200,
    avg_rsi, pct_rsi_overbought, pct_rsi_oversold, pct_rsi_neutral, otc_guard}.
model_price_distributiontool Compute statistical price targets using historical volatility.
Compute statistical price targets using historical volatility.
    Returns confidence intervals (68%, 95%, 99%) for where the price is likely to be.
momentum_consistencytool Rank stocks by how consistently their returns align across five time frames.FilesNetworkEnv varsoutside text
Rank stocks by how consistently their returns align across five time frames.

    A stock up on the day might be noise. A stock up on the day, the week, the
    month, the quarter, AND year-to-date is a genuine momentum leader. This tool
    computes a consistency_score in [0, 1] for every stock: 1.0 means all five
    timeframes (1d, 1W, 1M, 3M, YTD) align; 0.0 means none do.

    The timeframes are weighted (1d 15%, 1W 20%, 1M 25%, 3M 20%, YTD 20%) so
    longer-duration alignment contributes more to the score. Timeframes without
    data are skipped and weights are re-normalized, so the score stays in [0,1].

    Use direction="bear" to find consistent downtrends (laggards, short ideas).
    Use min_aligned to filter for a minimum number of timeframes aligning.

    market:     one of scan_list_markets() ids.
    direction:  "bull" (positive returns dominate) or "bear" (negative).
    min_aligned: minimum number of timeframes that must align (0 = no filter).
    filters:    optional extra filters (e.g. a market-cap floor).
    limit:      rows to sample (default 500; more = better coverage).
    top:        max stocks to return (default 50).

    Returns {market, universe, sample, direction, top:[{name, close, change,
    sector, market_cap_basic, consistency_score, timeframes_aligned,
    timeframes_total, positive_tf, negative_tf, perf_1w, perf_1m,
    perf_3m, perf_ytd}]}.
new_highs_lowstool Stocks at or near their 52-week highs and lows: a classic breadth gauge.FilesNetworkEnv varsoutside text
Stocks at or near their 52-week highs and lows: a classic breadth gauge.

    The NH/NL ratio (new highs / new lows) and the NH-NL difference are leading
    indicators of internal market health. A rising new-high count and a positive
    NH-NL difference signal broad participation in an advance. A rising new-low
    count signals deterioration under the surface even when indices hold up.

    market:    one of scan_list_markets() ids.
    filters:   optional filters to scope the universe (e.g. a market-cap floor).
    threshold: fractional distance from the 52w extreme to count as "at" the
               level. Default 0.02 = within 2%. Use 0.05 for "near highs/lows".
    limit:     rows to sample (default 500).
    include_otc: scan OTC too (default False). This is a breadth gauge reported
               as counts and percentages, so shells vote on the reading.

    Returns {market, universe, sample, new_highs_count, new_lows_count,
    nh_nl_ratio, nh_nl_diff, pct_new_highs, pct_new_lows,
    new_highs:[{name,close,high_52w,pct_from_high,change,sector}],
    new_lows:[{name,close,low_52w,pct_from_low,change,sector}], otc_guard}.
relative_strength_leaderstool Find stocks outperforming their sector peers: sector-relative strength leaders.FilesNetworkEnv varsoutside text
Find stocks outperforming their sector peers: sector-relative strength leaders.

    Raw change% ranks every stock together across the entire market. This tool
    re-ranks by sector-relative excess return: how much is each stock beating
    (or lagging) its own sector's average? A stock up 3% in a sector down 2% is
    outperforming by 5 points and surfaces near the top. A stock up 1% in a sector
    up 4% is actually lagging and scores lower.

    The composite rs_score (0-100, percentile rank) weights excess returns across
    three timeframes: 50% 1-day, 30% 1-month, 20% YTD. This finds stocks with
    sustained leadership within their sector, not just today's noise.

    Use this to:
    - Find sector leaders before they show up on the raw gainers list.
    - Identify stocks holding up best during sector-wide drawdowns.
    - Cross-reference with `scan_sector_rotation` to double down on the hot sector's
      strongest names.

    market:  one of scan_list_markets() ids.
    filters: optional extra filters (e.g. a market-cap floor).
    limit:   rows to sample (default 500; more coverage = more reliable sector avgs).
    top:     max stocks to return (default 50).
    include_otc: scan OTC too (default False).

    Returns {market, universe, sample, top:[{name, close, change, sector,
    market_cap_basic, rs_score, excess_1d, excess_1m, excess_ytd,
    sector_avg_change, perf_1m, perf_ytd}]}.
run_custom_screentool Build a custom stock screen with dynamic filter conditions.
Build a custom stock screen with dynamic filter conditions.

    Each filter is {field, operator, value}. Operators: >, >=, <, <=, ==, !=.
    Fields: RSI, ADX, ATR, EMA5-200, SMA5-200, MACD.macd, MACD.signal,
    BB.upper, BB.lower, Stoch.K, Stoch.D, CCI20, W.R, volume, close,
    change, gap, market_cap_basic, Aroon.Up, Aroon.Down, VWAP, MoneyFlow.
run_factor_presettool Rank a market by a named composite factor (see list_factor_presets).FilesNetworkEnv varsoutside text
Rank a market by a named composite factor (see list_factor_presets).

    Applies the factor's weighted, direction-aware z-score blend, adds a
    "factor_score" column, and ranks by it. Narrow the universe first with
    `filters` (recommended, e.g. a market-cap floor) so the ranking is over a
    meaningful set.

    On america, OTC is excluded by default. The blend is z-scored ACROSS the
    returned rows, so this is not only about which names surface: a shell with
    an absurd reading moves the mean and the standard deviation, and therefore
    every other row's score. Pass include_otc=True to scan the full venue.
run_presettool Run a named preset scan (see list_presets) and return its rows.FilesNetworkEnv varsoutside text
Run a named preset scan (see list_presets) and return its rows.

    The preset supplies the market, filters, columns, and sort. `limit` caps
    the rows returned.

    Most signal presets exclude OTC by default, because an indicator reading on a
    sub-penny shell is computed from noise rather than from a trend: those rows
    carry "changes" like +9,900 percent, which is a $0.0001 tick expressed as a
    percentage. This is a data quality filter only. There is NO market cap or
    share price floor, so genuine small and cheap listed names still come back.

    Set include_otc=True to lift it and scan the full venue, deliberately. When
    the guard is active the response carries an `otc_guard` block reporting how
    many rows it removed, so nothing is dropped silently.
run_stock_screentool Run a stock screen using TradingView's scanner.
Run a stock screen using TradingView's scanner.

    22 presets: most_active, new_highs, new_lows, overbought, oversold,
    high_relative_volume, gap_up, gap_down, bullish_ema_stack, bearish_ema_stack,
    high_momentum, large_cap_undervalued, top_gainers, biggest_losers,
    most_volatile, pre_market_gainers, pre_market_losers, pre_market_active,
    pre_market_gappers, after_hours_gainers, after_hours_losers, after_hours_active.
save_strategytool Save a custom strategy to disk for re-use.
Save a custom strategy to disk for re-use.
screentool Run a live market screen and return the matching rows.FilesNetworkEnv varsoutside text
Run a live market screen and return the matching rows.

    This is the full engine the web app uses, including the analytics layer that
    makes this more than a filter.

    market:  one of scan_list_markets() ids (america, crypto, forex, futures, bond, cfd).
    filters: list of {"field","op","value"}. See scan_list_operators(). Values may be
             numbers, strings, lists, or another field id (cross-field). Example:
             [{"field":"market_cap_basic","op":">","value":1e9},
              {"field":"RSI","op":"<","value":30}]
    columns: field ids to select (see scan_search_fields). Defaults to a sensible set.
    match:   "all" (AND) or "any" (OR) across filters.
    sort:    list of {"field","dir"} with dir "asc"|"desc". First key is applied
             server-side; you may sort by a computed/stat/factor column too.
    computed: derived columns via a sandboxed expression engine, e.g.
             [{"id":"dollar_vol","expr":"close*volume"},
              {"id":"range_pct","expr":"(high-low)/close*100"}].
             Operators + - * / % ** and abs min max round sqrt log ln floor ceil.
    stats:   in-result statistics computed across the returned set, e.g.
             [{"fn":"zscore","field":"change"},{"fn":"pctrank","field":"volume"}].
             fn is one of zscore | pctrank | rank | norm | madzscore | winsor | decile.
             Column name is "fn(field)". madzscore uses median+MAD (outlier-resistant).
             winsor clips at 5th/95th pct then normalizes to [0,1] (factor scoring).
             decile assigns each row to a decile 1-10 (1=lowest, 10=highest).
    factor:  composite factor score: list of {"field","weight","dir"} with dir
             "high"|"low". Adds a "factor_score" column and ranks by it when no
             explicit sort is given.
    limit:   max rows (default 50). offset: skip N rows for paging.

    Returns {count, returned, market, ms, columns, rows, table}. `count` is the
    full universe size matching the filters; `rows` is the page you asked for.
screen_canslimtool Screen for growth stocks matching CANSLIM criteria.
Screen for growth stocks matching CANSLIM criteria.
    Identifies high-growth leaders near 52-week highs with strong institutional sponsorship.
screen_peadtool Screen for Post-Earnings Announcement Drift (PEAD) setups.
Screen for Post-Earnings Announcement Drift (PEAD) setups.
    Identifies stocks that gapped up on earnings and are now pulling back to EMA10/20.
screen_vcptool Screen for stocks forming a Volatility Contraction Pattern (VCP).
Screen for stocks forming a Volatility Contraction Pattern (VCP).
    Identifies Stage 2 uptrends forming tight bases near breakout points.
search_fieldstool Search the TradingView field universe (1000+ fields) by id, label, or group.
Search the TradingView field universe (1000+ fields) by id, label, or group.

    This is how you discover what you can filter, sort, and select on. The
    curated set (price, performance, valuation, profitability, dividends,
    technicals, moving averages, oscillators, volume, volatility) leads; every
    other queryable base field is reachable too.

    query: case-insensitive substring matched against field id and label.
    group: optional exact group filter, e.g. "Oscillators", "Valuation".
    Returns {count, fields:[{id,label,group,type,unit,curated}]}.
search_knowledgetool Search Sam's library of 139 trading books + methodology guides.
Search Sam's library of 139 trading books + methodology guides.
    Returns relevant passages with source citations.
search_symbolstool Find symbols by ticker or company name (substring, case-insensitive).FilesNetworkEnv varsoutside text
Find symbols by ticker or company name (substring, case-insensitive).

    Resolves "apple" or "nvda" to real rows so you can hand a ticker to the
    other tools. Matches the `name` and `description` fields. Returns
    {count, symbols:[{ticker,name,description,close,change,sector,market_cap_basic}]}.
sector_breakdowntool Aggregate a screen by sector: count, average change, and total market cap.FilesNetworkEnv varsoutside text
Aggregate a screen by sector: count, average change, and total market cap.

    A bird's-eye read of where the money and the moves are right now. Aggregates
    over the returned set (apply `filters` to scope it, e.g. a market-cap floor).
    Returns sectors sorted by total market cap.

    On america, OTC is excluded by default as a data quality filter, since a
    third of the universe is sub-penny shells whose changes are a fraction of a
    cent expressed as a percentage. No market cap or price floor is applied.
    Pass include_otc=True to scan the full venue. The response carries an
    `otc_guard` block so the exclusion is never silent.
sector_rotationtool Rank sectors by multi-timeframe momentum: a sector rotation dashboard.FilesNetworkEnv varsoutside text
Rank sectors by multi-timeframe momentum: a sector rotation dashboard.

    Aggregates the screened universe by sector and computes per-sector:
      avg_change:    average 1-day change % (short-term momentum)
      avg_perf_1m:  average 1-month performance (medium momentum)
      avg_perf_ytd: average YTD performance (longer-term trend)
      avg_rsi:      average RSI (sentiment)
      total_market_cap: total market cap of sampled stocks in the sector
      momentum_score: weighted normalized blend (50% change, 30% 1M, 20% YTD)
                       scaled 0-1 so sectors can be compared at a glance.

    Sectors are returned sorted descending by momentum_score, so sector[0] has
    the strongest momentum right now. Use this to decide which sectors to hunt in
    before drilling into individual names with `scan_screen` or `scan_analyze`.

    market:  one of scan_list_markets() ids.
    filters: optional extra filters (e.g. a market-cap floor).
    limit:   stocks to sample (default 1000; spread across all sectors).
    include_otc: scan OTC too (default False). Sector averages are computed over
                 the sample, so shells drag whichever sector they land in.

    Returns {market, sampled, universe, sectors:[...], otc_guard}.
server_statstool Report screener MCP server health: calls served, cache hit rate, errors.
Report screener MCP server health: calls served, cache hit rate, errors.

    A self-monitoring tool, handy for confirming the cache is doing its job and
    that upstream calls are healthy.
sweep_setupstool Opportunity Board: scan multiple tickers for best options trades.
Opportunity Board: scan multiple tickers for best options trades.
    If no tickers given, auto-discovers from the most-active screener.
    Runs sell + buy scanners on each in parallel. Returns ranked board.
sweep_strategytool Run a strategy across multiple tickers (max 20). Ranks by Sharpe/return.
Run a strategy across multiple tickers (max 20). Ranks by Sharpe/return.
technical_ratingtool TradingView's own technical rating gauge for a symbol.FilesNetworkEnv varsoutside text
TradingView's own technical rating gauge for a symbol.

    Returns the overall, moving-average, and oscillator ratings (Strong Buy /
    Buy / Neutral / Sell / Strong Sell), optionally across several timeframes.

    timeframes: any of "1m","5m","15m","1h","4h","1d","1w","1mo" (default "1d").
top_moverstool Get the top N gainers and top N losers in any market right now.FilesNetworkEnv varsoutside text
Get the top N gainers and top N losers in any market right now.

    The fastest entry point for momentum, gap-fill, or reversal ideas. Two
    separate ranked lists in one call: stocks sorted by change% descending
    (gainers) and ascending (losers), both filtered the same way.

    On america, OTC is excluded by default. This tool ranks purely on change%,
    which is the metric a sub-penny shell wins by construction: a $0.0001 tick
    is a four figure percentage move. Measured unguarded, both lists came back
    10 of 10 OTC, so the tool was not reporting the day's movers, it was
    reporting rounding. No market cap or price floor is applied, so listed small
    caps still surface. Pass include_otc=True to scan the full venue.

    market:  one of scan_list_markets() ids (america, crypto, forex, ...).
    n:       movers to show on each side, 1-50 (default 10).
    filters: optional extra filters applied to both lists, e.g. a market_cap
             floor: [{"field":"market_cap_basic","op":">","value":1e9}].
    columns: fields to include. Defaults to name, description, close, change,
             volume, market_cap_basic, sector.
    include_otc: scan OTC too (default False).

    Returns {market, universe, gainers:[rows], losers:[rows],
    gainers_table, losers_table, otc_guard}.
volume_leaderstool Stocks with unusual volume right now, classified by price direction.FilesNetworkEnv varsoutside text
Stocks with unusual volume right now, classified by price direction.

    Finds every stock trading at or above min_rvol times its 10-day average
    volume, then classifies each as up/down/flat. The direction breakdown reveals
    whether the surge is buying pressure, selling pressure, or mixed. A sector
    breakdown shows which sectors have concentrated unusual activity. The leaders
    list is sorted by relative volume descending so the most unusual names lead.

    market:   one of scan_list_markets() ids (america, crypto, forex, ...).
    min_rvol: minimum relative-volume multiple (default 1.5 = 50% above normal).
              Use 2.0 for clear surges, 3.0 for extreme spikes.
    filters:  optional extra filters (e.g. a market-cap floor).
    limit:    rows to sample (default 500). Raise to 1000 for broader coverage.
    top:      max leaders to return (default 50).
    include_otc: scan OTC too (default False).

    Returns {market, universe, sample, count, min_rvol, by_direction,
    by_sector:[{sector,count,avg_rvol,up,down}],
    leaders:[{name,close,change,rvol,volume,sector,direction}], otc_guard}.
walk_forward_testtool Walk-forward validation: splits data into n folds, detects overfitting.
Walk-forward validation: splits data into n folds, detects overfitting.

Text the model reads (113)

Every tool, prompt and resource description as written in the code: the model sees all of it, the user usually does not.

list_markets tool
List the markets the screener can target.

    Returns each market's id (use as the `market` arg elsewhere), a label, and
    its kind. Covers US stocks, crypto, forex, futures, bonds, and CFDs.
search_fields tool
Search the TradingView field universe (1000+ fields) by id, label, or group.

    This is how you discover what you can filter, sort, and select on. The
    curated set (price, performance, valuation, profitability, dividends,
    technicals, moving averages, oscillators, volume, volatility) leads; every
    other queryable base field is reachable too.

    query: case-insensitive substring matched against field id and label.
    group: optional exact group filter, e.g. "Oscillators", "Valuation".
    Returns {count, fields:[{id,label,group,type,unit,curated}]}.
list_operators tool
List the filter operators, what value each expects, and what it means.

    Note the cross-field operators: a value may be another field id, so
    {"field":"SMA50","op":"crosses_above","value":"SMA200"} is a golden cross
    and {"field":"close","op":">","value":"VWAP"} is price over VWAP.
list_presets tool
List the one-click preset scans (id, name, description, market, group).

    47 presets across general scans and the SIGNALS / MOMENTUM / TREND /
    MULTI-TIMEFRAME signal groups. Pass `group` to filter, e.g. "Momentum".
    Run one with `scan_run_preset`.
list_factor_presets tool
List the composite factor-scoring presets (Momentum, Value, Quality, ...).

    Each is a weighted, direction-aware blend of fields. Run one with
    `scan_run_factor_preset` to rank a market by that factor.
screen tool
Run a live market screen and return the matching rows.

    This is the full engine the web app uses, including the analytics layer that
    makes this more than a filter.

    market:  one of scan_list_markets() ids (america, crypto, forex, futures, bond, cfd).
    filters: list of {"field","op","value"}. See scan_list_operators(). Values may be
             numbers, strings, lists, or another field id (cross-field). Example:
             [{"field":"market_cap_basic","op":">","value":1e9},
              {"field":"RSI","op":"<","value":30}]
    columns: field ids to select (see scan_search_fields). Defaults to a sensible set.
    match:   "all" (AND) or "any" (OR) across filters.
    sort:    list of {"field","dir"} with dir "asc"|"desc". First key is applied
             server-side; you may sort by a computed/stat/factor column too.
    computed: derived columns via a sandboxed expression engine, e.g.
             [{"id":"dollar_vol","expr":"close*volume"},
              {"id":"range_pct","expr":"(high-low)/close*100"}].
             Operators + - * / % ** and abs min max round sqrt log ln floor ceil.
    stats:   in-result statistics computed across the returned set, e.g.
             [{"fn":"zscore","field":"change"},{"fn":"pctrank","field":"volume"}].
             fn is one of zscore | pctrank | rank | norm | madzscore | winsor | decile.
             Column name is "fn(field)". madzscore uses median+MAD (outlier-resistant).
             winsor clips at 5th/95th pct then normalizes to [0,1] (factor scoring).
             decile assigns each row to a decile 1-10 (1=lowest, 10=highest).
    factor:  composite factor score: list of {"field","weight","dir"} with dir
             "high"|"low". Adds a "factor_score" column and ranks by it when no
             explicit sort is given.
    limit:   max rows (default 50). offset: skip N rows for paging.

    Returns {count, returned, market, ms, columns, rows, table}. `count` is the
    full universe size matching the filters; `rows` is the page you asked for.
run_preset tool
Run a named preset scan (see list_presets) and return its rows.

    The preset supplies the market, filters, columns, and sort. `limit` caps
    the rows returned.

    Most signal presets exclude OTC by default, because an indicator reading on a
    sub-penny shell is computed from noise rather than from a trend: those rows
    carry "changes" like +9,900 percent, which is a $0.0001 tick expressed as a
    percentage. This is a data quality filter only. There is NO market cap or
    share price floor, so genuine small and cheap listed names still come back.

    Set include_otc=True to lift it and scan the full venue, deliberately. When
    the guard is active the response carries an `otc_guard` block reporting how
    many rows it removed, so nothing is dropped silently.
run_factor_preset tool
Rank a market by a named composite factor (see list_factor_presets).

    Applies the factor's weighted, direction-aware z-score blend, adds a
    "factor_score" column, and ranks by it. Narrow the universe first with
    `filters` (recommended, e.g. a market-cap floor) so the ranking is over a
    meaningful set.

    On america, OTC is excluded by default. The blend is z-scored ACROSS the
    returned rows, so this is not only about which names surface: a shell with
    an absurd reading moves the mean and the standard deviation, and therefore
    every other row's score. Pass include_otc=True to scan the full venue.
lookup_symbol tool
Fetch one symbol's row by ticker (e.g. "NVDA", "BTCUSD").

    Matches case-insensitively on the `name` field. Returns the single row with
    the requested columns (or a broad default set), or an error if not found.
server_stats tool
Report screener MCP server health: calls served, cache hit rate, errors.

    A self-monitoring tool, handy for confirming the cache is doing its job and
    that upstream calls are healthy.
search_symbols tool
Find symbols by ticker or company name (substring, case-insensitive).

    Resolves "apple" or "nvda" to real rows so you can hand a ticker to the
    other tools. Matches the `name` and `description` fields. Returns
    {count, symbols:[{ticker,name,description,close,change,sector,market_cap_basic}]}.
compare tool
Put several symbols side by side on the same columns.

    tickers: e.g. ["NVDA","AMD","AVGO"]. columns defaults to a broad price +
    performance + valuation set. Returns the aligned rows and a rendered table.
technical_rating tool
TradingView's own technical rating gauge for a symbol.

    Returns the overall, moving-average, and oscillator ratings (Strong Buy /
    Buy / Neutral / Sell / Strong Sell), optionally across several timeframes.

    timeframes: any of "1m","5m","15m","1h","4h","1d","1w","1mo" (default "1d").
analyze tool
Read a symbol's chart: a structured, multi-timeframe technical analysis.

    Composes TradingView's own fields into trend, momentum, range, and rating
    reads plus a list of plain-language signals, so an agent can narrate "what
    the chart is saying" without eyeballing it. The read is multi-timeframe in a
    single call: RSI and MACD bias on the 1h, 4h, 1d, 1w, and 1m at once, with an
    alignment verdict, so nobody has to swap timeframes. Pure TradingView data.

    Returns {ticker, close, change, trend, momentum, multi_timeframe, range,
    rating, performance, signals[], summary}.
fundamentals tool
Read a symbol's fundamentals: valuation, profitability, growth, leverage, dividends.

    The counterpart to `analyze()`, which is deliberately technicals-only. This is the
    fundamentals half of the same symbol, composed from TradingView's own reported financials
    (same data `scan_screen`/`scan_compare` can already pull field-by-field, packaged here into a single
    narratable read plus plain-language flags).

    A missing field (TradingView carries no fundamentals for some ETFs, SPACs, and non-US
    listings) is left out of its section rather than shown as zero. A `0.0` P/E and a
    genuinely absent one must never look the same.

    Returns {ticker, sector, industry, valuation, profitability, growth, leverage, dividends,
    earnings, signals[], summary}.
chart tool
Get a live TradingView chart for a symbol: deep link + embeddable widget.

    Resolves the symbol to its exchange-prefixed ticker, then returns a chart
    URL plus a ready-to-paste TradingView Advanced Chart widget (config + HTML).
    Pure TradingView. interval accepts "1m".."1mo" friendly forms; theme is
    "dark" or "light".

    Returns {symbol, interval, chart_url, widget:{script,config}, embed_html}.
sector_breakdown tool
Aggregate a screen by sector: count, average change, and total market cap.

    A bird's-eye read of where the money and the moves are right now. Aggregates
    over the returned set (apply `filters` to scope it, e.g. a market-cap floor).
    Returns sectors sorted by total market cap.

    On america, OTC is excluded by default as a data quality filter, since a
    third of the universe is sub-penny shells whose changes are a fraction of a
    cent expressed as a percentage. No market cap or price floor is applied.
    Pass include_otc=True to scan the full venue. The response carries an
    `otc_guard` block so the exclusion is never silent.
market_breadth tool
Market breadth indicators: advancers/decliners, % above key MAs, RSI distribution.

    A single-call health read of the market (or a filtered slice of it). Useful
    for quickly answering "is the market broadly advancing or declining?" and
    "how stretched is sentiment right now?" before drilling into individual names.

    market:  one of scan_list_markets() ids.
    filters: optional extra filters, e.g. a market-cap floor to focus on a tier.
    limit:   rows to sample (default 500; the full scan is often 7000+ stocks).
    include_otc: scan OTC too (default False). Breadth is a PERCENTAGE over the
                 universe, so this matters more here than in a top-N list: a
                 third of america is sub-penny shells, and letting them vote
                 moves every ratio this tool reports.

    Returns {market, universe, sample, advancers, decliners, unchanged, ad_ratio,
    pct_advancers, pct_decliners, avg_change, pct_above_sma50, pct_above_sma200,
    avg_rsi, pct_rsi_overbought, pct_rsi_oversold, pct_rsi_neutral, otc_guard}.
sector_rotation tool
Rank sectors by multi-timeframe momentum: a sector rotation dashboard.

    Aggregates the screened universe by sector and computes per-sector:
      avg_change:    average 1-day change % (short-term momentum)
      avg_perf_1m:  average 1-month performance (medium momentum)
      avg_perf_ytd: average YTD performance (longer-term trend)
      avg_rsi:      average RSI (sentiment)
      total_market_cap: total market cap of sampled stocks in the sector
      momentum_score: weighted normalized blend (50% change, 30% 1M, 20% YTD)
                       scaled 0-1 so sectors can be compared at a glance.

    Sectors are returned sorted descending by momentum_score, so sector[0] has
    the strongest momentum right now. Use this to decide which sectors to hunt in
    before drilling into individual names with `scan_screen` or `scan_analyze`.

    market:  one of scan_list_markets() ids.
    filters: optional extra filters (e.g. a market-cap floor).
    limit:   stocks to sample (default 1000; spread across all sectors).
    include_otc: scan OTC too (default False). Sector averages are computed over
                 the sample, so shells drag whichever sector they land in.

    Returns {market, sampled, universe, sectors:[...], otc_guard}.
new_highs_lows tool
Stocks at or near their 52-week highs and lows: a classic breadth gauge.

    The NH/NL ratio (new highs / new lows) and the NH-NL difference are leading
    indicators of internal market health. A rising new-high count and a positive
    NH-NL difference signal broad participation in an advance. A rising new-low
    count signals deterioration under the surface even when indices hold up.

    market:    one of scan_list_markets() ids.
    filters:   optional filters to scope the universe (e.g. a market-cap floor).
    threshold: fractional distance from the 52w extreme to count as "at" the
               level. Default 0.02 = within 2%. Use 0.05 for "near highs/lows".
    limit:     rows to sample (default 500).
    include_otc: scan OTC too (default False). This is a breadth gauge reported
               as counts and percentages, so shells vote on the reading.

    Returns {market, universe, sample, new_highs_count, new_lows_count,
    nh_nl_ratio, nh_nl_diff, pct_new_highs, pct_new_lows,
    new_highs:[{name,close,high_52w,pct_from_high,change,sector}],
    new_lows:[{name,close,low_52w,pct_from_low,change,sector}], otc_guard}.
volume_leaders tool
Stocks with unusual volume right now, classified by price direction.

    Finds every stock trading at or above min_rvol times its 10-day average
    volume, then classifies each as up/down/flat. The direction breakdown reveals
    whether the surge is buying pressure, selling pressure, or mixed. A sector
    breakdown shows which sectors have concentrated unusual activity. The leaders
    list is sorted by relative volume descending so the most unusual names lead.

    market:   one of scan_list_markets() ids (america, crypto, forex, ...).
    min_rvol: minimum relative-volume multiple (default 1.5 = 50% above normal).
              Use 2.0 for clear surges, 3.0 for extreme spikes.
    filters:  optional extra filters (e.g. a market-cap floor).
    limit:    rows to sample (default 500). Raise to 1000 for broader coverage.
    top:      max leaders to return (default 50).
    include_otc: scan OTC too (default False).

    Returns {market, universe, sample, count, min_rvol, by_direction,
    by_sector:[{sector,count,avg_rvol,up,down}],
    leaders:[{name,close,change,rvol,volume,sector,direction}], otc_guard}.
top_movers tool
Get the top N gainers and top N losers in any market right now.

    The fastest entry point for momentum, gap-fill, or reversal ideas. Two
    separate ranked lists in one call: stocks sorted by change% descending
    (gainers) and ascending (losers), both filtered the same way.

    On america, OTC is excluded by default. This tool ranks purely on change%,
    which is the metric a sub-penny shell wins by construction: a $0.0001 tick
    is a four figure percentage move. Measured unguarded, both lists came back
    10 of 10 OTC, so the tool was not reporting the day's movers, it was
    reporting rounding. No market cap or price floor is applied, so listed small
    caps still surface. Pass include_otc=True to scan the full venue.

    market:  one of scan_list_markets() ids (america, crypto, forex, ...).
    n:       movers to show on each side, 1-50 (default 10).
    filters: optional extra filters applied to both lists, e.g. a market_cap
             floor: [{"field":"market_cap_basic","op":">","value":1e9}].
    columns: fields to include. Defaults to name, description, close, change,
             volume, market_cap_basic, sector.
    include_otc: scan OTC too (default False).

    Returns {market, universe, gainers:[rows], losers:[rows],
    gainers_table, losers_table, otc_guard}.
momentum_consistency tool
Rank stocks by how consistently their returns align across five time frames.

    A stock up on the day might be noise. A stock up on the day, the week, the
    month, the quarter, AND year-to-date is a genuine momentum leader. This tool
    computes a consistency_score in [0, 1] for every stock: 1.0 means all five
    timeframes (1d, 1W, 1M, 3M, YTD) align; 0.0 means none do.

    The timeframes are weighted (1d 15%, 1W 20%, 1M 25%, 3M 20%, YTD 20%) so
    longer-duration alignment contributes more to the score. Timeframes without
    data are skipped and weights are re-normalized, so the score stays in [0,1].

    Use direction="bear" to find consistent downtrends (laggards, short ideas).
    Use min_aligned to filter for a minimum number of timeframes aligning.

    market:     one of scan_list_markets() ids.
    direction:  "bull" (positive returns dominate) or "bear" (negative).
    min_aligned: minimum number of timeframes that must align (0 = no filter).
    filters:    optional extra filters (e.g. a market-cap floor).
    limit:      rows to sample (default 500; more = better coverage).
    top:        max stocks to return (default 50).

    Returns {market, universe, sample, direction, top:[{name, close, change,
    sector, market_cap_basic, consistency_score, timeframes_aligned,
    timeframes_total, positive_tf, negative_tf, perf_1w, perf_1m,
    perf_3m, perf_ytd}]}.
relative_strength_leaders tool
Find stocks outperforming their sector peers: sector-relative strength leaders.

    Raw change% ranks every stock together across the entire market. This tool
    re-ranks by sector-relative excess return: how much is each stock beating
    (or lagging) its own sector's average? A stock up 3% in a sector down 2% is
    outperforming by 5 points and surfaces near the top. A stock up 1% in a sector
    up 4% is actually lagging and scores lower.

    The composite rs_score (0-100, percentile rank) weights excess returns across
    three timeframes: 50% 1-day, 30% 1-month, 20% YTD. This finds stocks with
    sustained leadership within their sector, not just today's noise.

    Use this to:
    - Find sector leaders before they show up on the raw gainers list.
    - Identify stocks holding up best during sector-wide drawdowns.
    - Cross-reference with `scan_sector_rotation` to double down on the hot sector's
      strongest names.

    market:  one of scan_list_markets() ids.
    filters: optional extra filters (e.g. a market-cap floor).
    limit:   rows to sample (default 500; more coverage = more reliable sector avgs).
    top:     max stocks to return (default 50).
    include_otc: scan OTC too (default False).

    Returns {market, universe, sample, top:[{name, close, change, sector,
    market_cap_basic, rs_score, excess_1d, excess_1m, excess_ytd,
    sector_avg_change, perf_1m, perf_ytd}]}.
ema_stack_scan tool
Rank stocks by EMA/SMA stack alignment: a bull-stack breadth indicator.

    Checks four moving-average alignment conditions for each stock:
      1. Price  above EMA8   (near-term momentum)
      2. EMA8   above EMA21  (fast EMAs in bull order)
      3. EMA21  above SMA50  (medium-term trend aligned)
      4. SMA50  above SMA200 (golden-cross long-term stack)

    stack_score is the count of conditions that hold (0-4). A score of 4
    is a full bull stack: price is above every MA and each MA is above the
    next slower one. A score of 0 is a full bear stack.

    The distribution doubles as a market breadth read: when most stocks are
    at 3-4 the broad trend is healthy; a slide to mostly 0-1 signals broad
    internal deterioration. pct_full_bull is a single summary number.

    Use min_stack=4 to screen for stocks in the cleanest uptrend; combine
    with a `filters` market-cap floor to keep the list investable.

    market:    one of scan_list_markets() ids.
    min_stack: return only stocks at or above this score (0 = no filter;
               3 = bull-bias; 4 = full bull stack only).
    filters:   optional extra filters (e.g. a market-cap floor).
    limit:     rows to sample (default 500).
    top:       max stocks to return (default 50).
    include_otc: scan OTC too (default False).

    Returns {market, universe, sample,
    distribution:{0:n, 1:n, 2:n, 3:n, 4:n, none:n},
    avg_stack_score, pct_full_bull, pct_full_bear,
    top:[{name, close, change, sector, market_cap_basic, rsi,
    stack_score, ma_alignment, conditions_available,
    price_vs_ema8, ema8_vs_ema21, ema21_vs_sma50, sma50_vs_sma200}]}.
earnings_radar tool
Find stocks with earnings announcements in the next N days.

    Earnings are the biggest single-day catalyst. This tool builds a forward
    radar of names about to report, grouped by timing bucket (today, this_week,
    later) and sector, with the context a trader needs before the bell:
    RSI, ATR% (a proxy for the expected intraday range), 1-month performance,
    and market cap.

    Use it the morning before the market opens to build an earnings watch-list.
    Pair with sector_rotation to see which sectors have the most catalysts
    coming, or with analyze to drill into the setups you care about most.

    market:  one of scan_list_markets() ids (america, crypto, ...).
    horizon: days ahead to look for earnings (default 7 = one week). Use 1 for
             today-only, 14 for a two-week forward radar.
    filters: optional extra filters (e.g. market_cap_basic > 1e9 to skip micro-
             caps, or RSI < 40 for oversold pre-earnings ideas).
    limit:   rows to pull from the market (default 1000). Raise to 1000 if you
             want broader small-cap coverage.
    top:     max stocks to return in the stocks list (default 50).

    Returns {market, universe, sample, horizon_days, count,
    by_bucket:{today,this_week,later},
    by_sector:[{sector,count,today,this_week,later}],
    stocks:[{name,close,change,sector,market_cap_basic,days_to_earnings,
    bucket,rsi,atrp,perf_1m}]}.
gap_scanner tool
Find stocks that opened with a significant gap and track intraday fill progress.

    A gap occurs when a stock opens above (gap up) or below (gap down) the
    previous session's close. Gaps are high-conviction setups: when the gap
    holds, it signals momentum continuation ("gap and go"); when it fills, it
    signals mean reversion back to the prior close.

    For each qualifying gap this tool reports:
      gap:          the opening gap % (positive = gap up, negative = gap down)
      prev_close:   yesterday's close, back-calculated from open and gap%
      gap_fill_pct: how much of the opening gap the current price has retraced.
                    0% = price still at the open; 100% = fully filled back to
                    yesterday's close; >100% = price overshot past the gap level.
      is_holding:   True when gap_fill_pct < 25 (gap still largely intact)
      is_filled:    True when gap_fill_pct >= 100 (full gap fill occurred)
      rvol:         relative volume (conviction read on the gap)

    market:      one of scan_list_markets() ids.
    min_gap_pct: minimum absolute gap % to qualify (default 1.0). Use 2.0
                 for larger, cleaner gaps; 0.5 to catch small gaps too.
    filters:     optional extra filters (e.g. a market-cap floor).
    limit:       rows to sample (default 500).
    top:         max stocks to return per side, gap_up and gap_down (default 50).

    Returns {market, universe, sample, min_gap_pct, count,
    gap_up_count, gap_down_count,
    by_sector:[{sector, count, gap_up, gap_down}],
    gap_up:[{name, close, open, change, sector, gap, prev_close, gap_fill_pct,
    is_holding, is_filled, volume, rvol}],
    gap_down:[same shape]}.
dividend_screen tool
Find high-quality dividend-paying stocks ranked by a Dividend Quality Score.

    Surfaces income ideas with a composite score (dq_score, 0-100) that weights
    three things simultaneously: how high the yield is, how long the dividend has
    grown consecutively (quality and reliability signal), and whether the payout
    ratio is in a healthy range (not so low it risks being cut, not so high it
    strains the balance sheet).

    Score components:
      yield component   30%: yield up to 10% maps to full credit
      growth streak     40%: consecutive years of dividend growth / 50 (capped)
      payout health     30%: ideal 20-75%, penalized outside that band
    dq_score is the percentile rank (0-100) of the raw composite in the sample.

    Category labels (based on consecutive years of dividend growth):
      Aristocrat   25+ consecutive years of growth (S&P Dividend Aristocrat tier)
      Achiever     10-24 years
      Grower       1-9 years
      Payer        paying dividends but no confirmed growth streak

    market:          one of scan_list_markets() ids (america works best; fundmental data
                     is sparse for crypto/forex/futures).
    min_yield:       minimum dividend yield % to qualify (default 1.0).
    min_years_growing: return only stocks with at least this many consecutive years
                     of dividend growth (0 = all payers; 10 = Achievers+; 25 = Aristocrats).
    filters:         optional extra filters (e.g. market_cap_basic > 1e9).
    limit:           rows to sample (default 500).
    top:             max stocks to return (default 50).
    include_otc:     scan OTC too (default False).

    Returns {market, universe, sample, min_yield, count, avg_yield,
    by_category:{Aristocrat, Achiever, Grower, Payer},
    by_sector:[{sector, count, avg_yield, aristocrats, achievers}],
    stocks:[{name, close, change, sector, market_cap_basic, div_yield,
    years_paying, years_growing, payout_ratio, roe, category, dq_score, perf_1m}]}.
fn tool
run_stock_screen tool
Run a stock screen using TradingView's scanner.

    22 presets: most_active, new_highs, new_lows, overbought, oversold,
    high_relative_volume, gap_up, gap_down, bullish_ema_stack, bearish_ema_stack,
    high_momentum, large_cap_undervalued, top_gainers, biggest_losers,
    most_volatile, pre_market_gainers, pre_market_losers, pre_market_active,
    pre_market_gappers, after_hours_gainers, after_hours_losers, after_hours_active.
run_custom_screen tool
Build a custom stock screen with dynamic filter conditions.

    Each filter is {field, operator, value}. Operators: >, >=, <, <=, ==, !=.
    Fields: RSI, ADX, ATR, EMA5-200, SMA5-200, MACD.macd, MACD.signal,
    BB.upper, BB.lower, Stoch.K, Stoch.D, CCI20, W.R, volume, close,
    change, gap, market_cap_basic, Aroon.Up, Aroon.Down, VWAP, MoneyFlow.
get_historical_data tool
Fetch OHLCV historical price data for a stock.

    Args:
        ticker: Stock symbol (e.g. "AAPL").
        period: 1d, 5d, 1mo, 3mo, 6mo, 1y, 2y, 5y, 10y, ytd, max.
        interval: 1m, 5m, 15m, 30m, 1h, 1d, 1wk, 1mo.
analyze_technicals tool
Compute 24 technical indicators: EMA 8/21/34/55/89, SMA 50/100/200,
    RSI(14), MACD(12,26,9), ADX(14), ATR(14), Williams %R, Stochastic,
    Bollinger Bands, CCI(20). Returns latest readings + analysis summary.
get_tv_analysis tool
Get TradingView 26-indicator technical consensus for a ticker.

    Returns STRONG_BUY/BUY/NEUTRAL/SELL/STRONG_SELL with buy/sell/neutral
    counts for both oscillators and moving averages.

    **Screener selection** — TradingView partitions symbols by asset class.
    Pick the right ``screener`` for the instrument or leave it ``None`` to
    auto-detect from the symbol shape:

    | Asset class            | Example symbols                | screener |
    |------------------------|--------------------------------|----------|
    | US equities            | NVDA, AAPL, TSLA               | america  |
    | Forex / commodity CFDs | XAUUSD, EURUSD, GBPUSD, USDJPY | cfd      |
    | Crypto                 | BTCUSD, ETHUSD, SOLUSD         | crypto   |
    | Futures (yfinance)     | GC=F, CL=F, ES=F               | america  |
    | Futures (TradingView)  | GC1!, ES1!, CL1!               | cfd      |

    Args:
        ticker: Symbol as shown above.
        interval: 1m, 5m, 15m, 1h, 4h, 1d (default), 1w, 1M.
        exchange: Exchange within the screener. Defaults to NASDAQ.
            Ignored when ``screener`` is set explicitly.
        screener: ``"america"``, ``"cfd"``, or ``"crypto"``. ``None``
            (default) auto-detects from the symbol.
generate_chart tool
Generate a candlestick chart with EMA overlays (8/21/34/55/89).
    Returns base64-encoded PNG and file path.
analyze_options_setup tool
VoPR™ engine: composite realized vol (4 estimators), VRP ratio,
    Black-Scholes Delta/Theta, A-F grade. Use when you need a specific
    DTE/strike analysis. Pass budget for strike recommendations.
find_best_to_sell tool
Auto-find the best puts and calls to SELL. Scans 7-45 DTE across
    multiple strikes. Scores on RoC, VoPR grade, theta efficiency, delta
    sweet spot. Returns top 3 puts + top 3 calls.
find_best_to_buy tool
Auto-find the best directional option to BUY. Reads technicals
    (RSI, EMA stack, MACD) to determine bullish/bearish bias, then scans
    21-60 DTE for optimal contract. Returns top 3 with direction rationale.
sweep_setups tool
Opportunity Board: scan multiple tickers for best options trades.
    If no tickers given, auto-discovers from the most-active screener.
    Runs sell + buy scanners on each in parallel. Returns ranked board.
get_fundamentals tool
Get fundamental data: P/E, EPS, revenue growth, profit margin,
    short interest, analyst targets, earnings dates, market cap.
fetch_ticker_news tool
Fetch recent financial news headlines for a stock from RSS feeds.
extract_article_text tool
Extract the full-text body of a news article. Strips ads and nav.
generate_alpha_card tool
Generate a shareable Alpha Card — a branded HTML analysis card.
    Combines technicals + TradingView consensus into a sleek visual.
    Perfect for sharing trade setups on Discord/Twitter.
search_knowledge tool
Search Sam's library of 139 trading books + methodology guides.
    Returns relevant passages with source citations.
log_conviction tool
Log a trade conviction to the journal. Direction: bullish/bearish/neutral.
    Conviction: high/medium/low. Include a thesis for future review.
    Entry price is fetched live automatically; entry_price is accepted but unused.
get_track_record tool
Get the full conviction journal track record with win/loss stats.
backtest_strategy tool
Backtest a trading strategy on historical data. 6 presets:
    ema_crossover, rsi_bounce, macd_momentum, bollinger_squeeze,
    golden_cross, ema_stack_breakout. Returns Sharpe, win rate, CAGR, etc.
save_strategy tool
Save a custom strategy to disk for re-use.
list_strategies tool
List all saved custom strategies.
get_learned_patterns tool
Get auto-extracted patterns from past backtests with win rates.
sweep_strategy tool
Run a strategy across multiple tickers (max 20). Ranks by Sharpe/return.
walk_forward_test tool
Walk-forward validation: splits data into n folds, detects overfitting.
get_market_pulse tool
AI-generated market sentiment with options flow score (-7 to +7).
    +5 to +7 = extremely bullish. -5 to -7 = panic-level bearish.
get_market_stats tool
Market-wide put/call ratios and sentiment indicators.
get_put_call_ratios tool
Put/call ratios for SPY, QQQ, IWM (or any ticker).
    Below 0.7 = complacent. Above 1.0 = elevated fear (contrarian bullish).
get_sector_flow tool
Sector-by-sector options flow with bullish/bearish sentiment.
    Compare flows: all red = real selling, mixed = rotation.
get_unusual_activity tool
Unusual options flow feed — institutional trades, premium, conviction.
    High conviction = $500K+ premium, unusual volume vs OI.
get_signals tool
Breakout and continuation signals with technical indicator data.
get_gex_overview tool
Gamma Exposure (GEX) for SPY/QQQ/IWM. Positive = pinning/calm.
    Negative = trending/volatile. GEX flip level = regime boundary.
get_earnings_calendar tool
Weekly earnings calendar — who reports this week.
get_earnings_flow tool
Pre-earnings options flow — institutional positioning ahead of earnings.
get_politician_trades tool
Congressional stock trading disclosures.
get_alpha_signals tool
Get recent alpha signals detected by the background signal factory.

    9 signal types: RSI_CROSS_UP_70, RSI_CROSS_DOWN_70, RSI_CROSS_UP_30,
    RSI_CROSS_DOWN_30, MACD_CROSS_UP, MACD_CROSS_DOWN, VOLUME_SPIKE,
    EMA_STACK_BREAKOUT, ADX_TREND_ENTRY.

    Signals are auto-detected every 5 min (market open) / 30 min (closed)
    across 24 popular tickers. Filter by ticker and/or signal type.
calculate_position_size tool
Calculate risk-based position size using Fixed Fractional, ATR, or Kelly methods.
    Answers 'how many shares/contracts should I buy?' given account size and risk tolerance.
screen_vcp tool
Screen for stocks forming a Volatility Contraction Pattern (VCP).
    Identifies Stage 2 uptrends forming tight bases near breakout points.
detect_market_top tool
Detect market topping signals using distribution days and leadership trends.
    Uses O'Neil distribution day counting and defensive sector rotation analysis.
detect_ftd tool
Detect Follow-Through Days (FTDs) on major indices to confirm market bottoms.
    Identifies the start of a new bull market using O'Neil price/volume expansion rules.
screen_pead tool
Screen for Post-Earnings Announcement Drift (PEAD) setups.
    Identifies stocks that gapped up on earnings and are now pulling back to EMA10/20.
analyze_pair tool
Analyze a pair of stocks for statistical arbitrage.
    Computes correlation, ratio, and Z-score of the spread between two assets.
screen_canslim tool
Screen for growth stocks matching CANSLIM criteria.
    Identifies high-growth leaders near 52-week highs with strong institutional sponsorship.
analyze_scenario tool
Generate bull/base/bear scenarios for a ticker based on a catalyst (e.g. 'earnings', 'tariffs').
    Provides price targets and probabilities based on technical volatility and trend.
model_price_distribution tool
Compute statistical price targets using historical volatility.
    Returns confidence intervals (68%, 95%, 99%) for where the price is likely to be.
get_exposure_recommendation tool
Get a market exposure recommendation (0-100% capital deployment).
    Synthesizes VIX, flow, distribution days, and trend confirmation into a single capital deployment ceiling.
get_market_environment tool
Get a cross-asset market environment report.
    Snapshots performance for Equities, Bonds, Commodities, Currencies, and Crypto to identify macro rotation.
detect_macro_regime tool
Detect the current structural market regime (Growth, Inflation, Deflation, or Goldilocks).
    Uses cross-asset ratios like RSP/SPY, TLT/SHY, and XLY/XLP to identify macro shifts.
analyze_breadth tool
Get a comprehensive market breadth health score (0-100).
    Synthesizes equal-weight vs cap-weight trends, new highs/lows, and volatility term structure.
analyze_uptrend_participation tool
Measure market participation in structural uptrends.
    Scans all 11 SPDR sectors and major indices to see what % are trading above their EMA50 and EMA200.
detect_themes tool
Identify trending market themes by clustering thematic ETF performance.
    Detects which groups (AI, Biotech, Energy, etc.) are moving together with the most momentum.
analyze_recent_gap tool
Score the most recent overnight gap reaction (0-100) for a specific ticker.
    Evaluates gap size, volume expansion, price hold, and fundamental quality to grade the trade setup.
detect_bubble_risk tool
Assess current market euphoria and bubble risk (0-15 score).
    Evaluates price extension from 200d MA, VIX complacency, valuation (PE), speculative volume, and meme stock fever.
get_momentum_pulse tool
Calculate real-time momentum scores (0-100) for each ticker.

    Uses EMA stack alignment, RSI sweet-spot, and ADX strength.
    Score >70 = strong bullish momentum, <30 = momentum exhausted.
    Defaults to the 24 pre-warmed tickers if none specified.
get_sec_filings tool
SEC EDGAR filing index straight from the primary source: the
    recent-events sweep. `forms` narrows to types like ["8-K", "10-Q"].
get_sec_financials tool
Multi-period financials from SEC XBRL, including the accrual gap
    (net income minus operating cash flow: positive means earnings are
    accrual-driven rather than cash-backed).
get_shares_outstanding tool
Cover-page share count straight from the 10-Q/10-K filing, not an
    aggregator's derived figure. Flags an implausible diluted count instead
    of silently returning it.
get_stakes_held tool
AS-FILER 13D/13G: stakes this company holds in OTHER public companies
    (e.g. GME's 9.8% stake in eBay), not who owns this ticker.
etf_briefing tool
Pre-market institutional briefing: top ETF buys and sells, multi-provider
        convergence, accumulation streaks, notable new option positions.
etf_signals tool
Conviction-scored institutional buy/sell signals from daily ETF holdings
        changes. `category` restricts to 'active-equity' (ARK, Avantis, Sprott) or
        'option-income' (YieldMax, Kurv, REX, Roundhill).
etf_institutional_flow tool
Aggregate accumulation/distribution: all active-equity funds blended into
        one AUM-weighted portfolio, showing what institutions are net buying.
etf_institutional_trend tool
Per-ticker institutional accumulation/distribution trend across day, week
        and month horizons at once.
etf_holdings_changes tool
Raw institutional position changes, filterable by provider ('ARK Invest',
        'Avantis', 'YieldMax'), fund symbol, or direction. This is the primitive the
        other signal tools are computed from.
etf_divergences tool
Cross-fund divergences: where different institutional funds traded the SAME
        ticker in OPPOSITE directions. Disagreement between managers, not consensus.
etf_layering_patterns tool
Layering: 3+ independent stock-pickers opening the SAME new position within
        days of each other. Needs the full cross-fund panel over time to see at all.
etf_sector_flow tool
Sector-level institutional inflows and outflows from fund holdings.
        NOTE: this is fund positioning — `get_sector_flow` (no prefix) is a different
        dataset, options premium by sector.
etf_stock_activity tool
Everything institutional for one stock: which funds hold it, how weights
        moved, and its accumulation/distribution trend.
etf_fund_detail tool
One ETF's detail: top holdings, options count, AUM. e.g. ARKK, AVUV, NVDY.
etf_list_funds tool
All 71 tracked funds with holdings counts and top positions.
etf_list_tickers tool
The most widely-held underlyings across all tracked funds (~2,270 total).
etf_income_overview tool
Option-income funds by structure: covered-call, synthetic, leap-proxy, swap.
etf_income_fund_detail tool
One income fund's full book: call coverage, moneyness, options overlay.
etf_options_listings tool
CBOE daily diff: newly optionable stocks and new weekly listings.
etf_signal_performance tool
Historical backtest performance of TickerTrace conviction signals.

        The published track record — the one asset here a fork cannot obtain,
        because forking gets the code from today forward, not the history that
        makes the score mean anything.
etf_global_stats tool
Coverage stats: funds tracked, unique underlyings, options contracts,
        and today's new positions and exits.
momentum_breakouts prompt
Find and read the strongest momentum breakouts right now.
oversold_quality prompt
Hunt for oversold names that are still high quality.
rank_by_factor prompt
Rank a market by a composite factor and read the leaders.
read_symbol prompt
Give a full plain-language chart read for one symbol.
fn prompt
trading_assistant prompt
Start a trading analysis session with access to institutional-grade tools.
fields_resource resource
The full field catalog (id, label, group, type, unit).
presets_resource resource
Every preset scan and factor preset, in full.
operators_resource resource
The filter operator reference.
fn resource
get_welcome resource
Welcome message and overview of the Momentum trading tools platform.

What we checked

The same checks run on every server. Each line below has one of these marks:

FoundA published issue such as a risky tool or a CVE
PassedWe ran the check on this server and found nothing
After reviewChecked; we publish it once a person verifies it
Partly tracedRan, but the scanner could not follow every path to its end
FactWhat the code does, not a judgement either way
Not checkedThe scanner had nothing to read for it, or it needs the live server
Code Safetypartly traced
  • 8 checks: command injection, argument injection, path traversal, server-side request forgery, SQL injection, code execution, unsafe deserialization, template injection
    Checked on every scan. Results in this category are published only after a person has verified them.
Capability Exposure6.1
  • Runs programs the caller chooses
    No tool runs a command or program the caller supplies — 110 tool handlers traced. Not every path could be followed, so this is not a clean pass.
  • Executes caller-supplied code
    No tool evaluates code the caller supplies — 110 tool handlers traced. Not every path could be followed, so this is not a clean pass.
  • Reads or writes any file path
    No tool works on a file path the caller supplies without a root check — 110 tool handlers traced. Not every path could be followed, so this is not a clean pass.
  • Requests any address
    No tool sends a request to an address the caller supplies — 110 tool handlers traced. Not every path could be followed, so this is not a clean pass.
  • Runs caller-supplied SQL
    No tool executes a query the caller supplies — 110 tool handlers traced. Not every path could be followed, so this is not a clean pass.
  • Tools that start processes
    Not seen in the traced code of 113 capabilities; 99 more call code the scanner could not follow, where it may happen
  • Tools that touch files
    22 of 113 capabilities touch files; 77 more call code the scanner could not follow, where it may happen
  • Tools that call the network
    37 of 113 capabilities call the network; 62 more call code the scanner could not follow, where it may happen
Where the code is: 113 handlers in 3 files at commit 898682badab7
Prompt Integrity10.0
  • 5 checks: tool poisoning, instruction override, hidden content, exfiltration requests, metadata integrity
    Checked on every scan. Results in this category are published only after a person has verified them.
Supply Chain7.0
  • Dependency manifests
    1 manifest: requirements.txt
  • Lockfiles checked against OSV
    1 file resolved and checked against the OSV database; 1 not resolved: requirements.txt: 16 dependency lines carry no exact version, so the installed version was not checked; pin them or add a lockfile
  • Known vulnerabilities in production dependencies
    No production dependency with a known advisory
  • Known vulnerabilities in other dependencies
    No package used only for development, tests or examples has a known advisory
  • MCP SDK version
    fastmcp >=3.0
Secrets & Credentials10.0
  • 3 checks: credential harvesting, undeclared credential access, credentials sent over the network
    Checked on every scan. Results in this category are published only after a person has verified them.
  • Tools that read credentials
    Not seen in the traced code of 113 capabilities; 99 more call code the scanner could not follow, where it may happen
  • Environment variables
    22 capabilities read environment variables (often API keys)
  • Authentication declared
    Not checked: needs the live server's tools/list (a remote server declares how clients authenticate)
Behavior Transparency10.0
  • 3 checks: undeclared network access, undeclared file access, undeclared process execution
    Checked on every scan. Results in this category are published only after a person has verified them.
  • Tool descriptions present
    Every tool has a description the model and the user can read
  • Statically known names
    Every tool's name could be read from the code
  • Input schemas
    Not checked: needs the live server's tools/list (every tool declares an input schema)
  • Destructive tools annotated
    Not checked: needs the live server's tools/list (tools that write, delete or run commands carry destructivehint)

Dependencies with known vulnerabilities (0 in production)

Dependency ranges were not resolved against a lockfile, so the score is capped at 7.

No known vulnerabilities in the production dependencies that could be checked.

Past security advisories

Vulnerabilities published for this server itself, from the GitHub Advisory Database.

No security advisories have been published for this server in the GitHub Advisory Database.

How it runs

Where it runsOn your machine, started by your MCP client from this repository or its package
Transportstdio
Sign-innot checked needs the live server
MCP SDKfastmcp >=3.0
Servers in the code2 (momentum, scanline-test)

The project's own security

Security policynone no SECURITY.md in the repository: report issues privately through GitHub if it is enabled
Past advisoriesnone in the GitHub Advisory Database
Last push2026-10-21
Signed releasesnot checked yet

Where it is published

Listed in3 catalogs (github_search, glama, mcp_toplist)
LicenseApache-2.0
Created2026-03-16

Attack map

How the server is built and where its risky tools lead: servers, their tools, what the tools' code can do, and the traced route from a declared risky tool's argument to the operation it reaches. Click a node for details.

Request a scan or an audit

Tell us about your server. We reply within 5 working days.

What do you need? *

We use these details only to answer you.