Skip to main content
Glama

get_technical_indicators

Calculates technical indicators for Chinese A-share stocks from K-line data, including MA, MACD, KDJ, RSI, and BOLL, to support realtime technical analysis.

Instructions

    Calculates technical indicators for a Chinese A-share stock.
    
    This tool fetches K-line data using Ashare and calculates indicators using MyTT library.
    Combines realtime data with technical analysis.

    Args:
        code: The stock code. Supports multiple formats (same as get_realtime_kline).
        frequency: K-line frequency. Valid options:
                   '1m', '5m', '15m', '30m', '60m', '1d', '1w', '1M'.
                   Defaults to '1d'.
        count: Number of K-line bars to fetch. Defaults to 120 for accurate indicator calculation.
        indicators: List of indicators to calculate. Valid options:
                    - 'MA': Moving Average (5, 10, 20日均线)
                    - 'EMA': Exponential Moving Average (12, 26日)
                    - 'MACD': Moving Average Convergence Divergence
                    - 'KDJ': Stochastic Oscillator
                    - 'RSI': Relative Strength Index
                    - 'WR': Williams %R
                    - 'BOLL': Bollinger Bands
                    - 'BIAS': Bias Ratio
                    - 'CCI': Commodity Channel Index
                    - 'ATR': Average True Range
                    - 'DMI': Directional Movement Index
                    - 'TAQ': Donchian Channel (唐安奇通道)
                    Defaults to ['MA', 'MACD', 'KDJ', 'BOLL', 'RSI'] if not specified.
        format: Output format: 'markdown' | 'json' | 'csv'. Defaults to 'markdown'.

    Returns:
        K-line data with calculated technical indicators.
    

Input Schema

NameRequiredDescriptionDefault
codeYes
countNo
formatNomarkdown
frequencyNo1d
indicatorsNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

B3.3/5.0
Behavior3/5

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

No annotations are provided, so the description carries the full behavioral disclosure burden. It usefully explains that the tool fetches K-line data via Ashare and calculates indicators with MyTT, and that it combines realtime data with technical analysis. It omits whether the operation is read-only, permission requirements, rate limits, error behavior, and output shape.

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?

The description is front-loaded with the purpose and then uses clear Args and Returns sections. It is somewhat verbose and repeats the calculation concept, but the detailed indicator list and defaults earn their place.

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

Completeness3/5

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

For a five-parameter tool with no annotations and no output schema, the description covers invocation well enough. However, the return value is only summarized as K-line data with indicators, and exact indicator calculation parameters for several indicators are not specified.

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

Parameters4/5

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

Schema description coverage is 0%, so the description must compensate and largely does: it documents all five parameters, including frequency options, default count rationale, indicator options and defaults, and output format choices. The main gap is that the code format is only defined by reference to get_realtime_kline rather than being self-contained.

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?

The description states a specific verb and resource: calculating technical indicators for Chinese A-share stocks. It also explains the underlying data and calculation approach. However, it does not explicitly distinguish this tool from siblings such as get_stock_analysis or get_realtime_kline beyond referring to get_realtime_kline for code formats.

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

Usage Guidelines2/5

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

The description explains what the tool does but gives no explicit guidance on when to use it instead of alternatives like get_stock_analysis, get_realtime_kline, or get_price_history. There are no exclusions, prerequisites, or alternative-selection cues.

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