Skip to main content
Glama
yfinance-ta-patterns

yfinance-ta-patterns

by eminsk

Scan Symbol Patterns & AI Confluence

ta_scan_symbol
Read-only

Scan any market symbol for candlestick patterns and AI confluence scores, then generate actionable trade setups with entry, stop-loss, and take-profit levels.

Instructions

Scan a market symbol (Stocks, Crypto, Forex, Indices, Commodities, e.g. 'BTC-USD', 'NVDA', 'AAPL', 'EURUSD=X') for candlestick patterns, compute AI Confluence Scores (Trend + RSI + Volume + ATR), and generate actionable Trade Setups (Entry, Stop-Loss, TP1, TP2).

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "symbol": "<symbol>"
    },
    "name": "ta_scan_symbol"
  }
}

Input Schema

NameRequiredDescriptionDefault
periodNoHistorical lookback period ('7d' for 1m, '60d' for 5m/15m/30m, '6mo'/'1y'/'2y' for 1h/4h/1d; auto-clamped to Yahoo Finance limits)6mo
symbolYesTicker symbol (e.g. 'BTC-USD', 'NVDA', 'EURUSD=X')
compactNoIf true (default), returns streamlined trade setups to minimize token usage and stay well below LLM context limits; if false, returns full indicator dumps.
timeframeNoTimeframe interval ('15m', '1h', '4h', '1d', '1wk')1d
include_newsNoIf true, include recent market news headlines affecting this ticker
max_patternsNoMaximum number of active pattern setups to return (default: 25, max: 50)
include_briefNoIf true, include a human-readable markdown_brief alongside structured JSON patterns
lookback_barsNoNumber of recent bars to evaluate for active patterns (1-60)
min_confidenceNoMinimum AI Confluence score in [0.0, 1.0]

Output Schema

NameRequiredDescriptionDefault
newsNo
engineNo
periodNo
setupsNo
symbolNo
compactNo
patternsNo
timezoneNo
timeframeNo
event_riskNo
truncated_toNo
markdown_briefNo
market_summaryNo
total_patterns_foundNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv0.3.75
    • addedInput schema / properties / include_news
      Added value: +{
      +  "default": false,
      +  "description": "If true, include recent market news headlines affecting this ticker",
      +  "type": "boolean"
      +}
    • addedOutput schema / properties / news
      Added value: +{
      +  "type": "array"
      +}
  2. First observedv0.3.60

TDQS

A3.5/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already declare readOnlyHint and openWorldHint, so the safety profile is covered structurally. The description adds that the tool runs a computation pipeline (patterns → Trend/RSI/Volume/ATR confluence → entry/SL/TP) and that data is fetched for a symbol, but it says nothing about data source latency, rate limits, or failure modes for unknown tickers — the main behavioral risks for an open-world read.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

One front-loaded sentence that puts the resource and the three deliverables first, with the ticker examples and score composition after. No filler or repetition, though the parenthetical indicator list is somewhat dense inline.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With a full output schema, complete parameter documentation, and read-only annotations, the description only needs to frame purpose and outputs — which it does. It is slightly thin on how symbol format varies by asset class and on any precondition around period/timeframe clamping, but those gaps are minor.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100% and all nine parameters carry their own descriptions and defaults, so the baseline is 3. The description adds only the indicator composition behind the confluence score and a few example ticker formats, which the symbol parameter description already repeats.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

Uses a specific verb ('Scan') on a specific resource ('a market symbol') and enumerates the three outputs: candlestick patterns, AI Confluence Scores, and Trade Setups with named fields. An agent knows exactly what it gets back, but nothing in the text distinguishes this from siblings like ta_scan_watchlist or ta_backtest_patterns, so it stops short of a 5.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Usage is only implied by the output description — the agent can infer 'use this when you want patterns/setups for one ticker.' There is no explicit when-to-use, no statement about when to prefer ta_scan_watchlist (multi-symbol) or ta_backtest_patterns, and no exclusions or prerequisites.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.