Skip to main content
Glama

Asia Market Data

kline

Read-onlyIdempotent

Get historical daily K-line (candlestick/OHLCV) bars for one stock.

Returns daily bars only — this tool never returns intraday ticks; for the latest available price use stock_quote. A-share and HK bars come from the Tencent public feed (forward-adjusted where the feed provides it, which is not guaranteed for HK); US bars come from yfinance. Newer dates last. No authentication required.

Use this when the request is about history: trends, ranges, chart data over days-to-a-year. For the latest price alone use stock_quote (much faster); for market-wide indices use market_summary. Read-only.

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": "kline"
  }
}

Input Schema

NameRequiredDescriptionDefault
periodNoLookback window ending today: "1mo", "3mo", "6mo", or "1y". Defaults to "3mo". For A-share and HK symbols any other value returns an error. Each bar has date, open, close, high, low, volume.3mo
symbolYesStock symbol in CODE.MARKET format — SH, SZ, HK, or US (e.g. "600519.SH", "0700.HK", "AAPL.US"). HK codes may omit leading zeros.

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already cover read-only, idempotency, and open-world characteristics, yet the description adds real behavioral context: per-market data provenance (Tencent feed for A-share/HK, yfinance for US), an adjustment caveat (forward-adjusted not guaranteed for HK), ordering ('newer dates last'), and no-auth requirement. Minor duplication of the annotation ('Read-only.') keeps it off a 5.

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?

Front-loaded with the core purpose, then alternation guidance, then provenance caveats — a logical order. A few lines restate structured data ('Read-only.', the OHLCV field list also present in the schema), which is mild waste but doesn't obscure meaning.

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

Completeness5/5

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

For a two-parameter read tool with a full schema, an output schema, and annotations, the description covers everything an agent needs: what it returns, granularity limits, market-specific sourcing quirks, and correct sibling routing. Nothing material is missing.

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 coverage is 100% and the period field already documents allowed values, the error behavior for A-share/HK out-of-range values, default, and per-bar fields. The description adds little parameter-level meaning beyond the schema, so the baseline 3 applies.

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

Purpose5/5

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

The opening sentence gives a specific verb and resource ('Get historical daily K-line (candlestick/OHLCV) bars for one stock') and immediately bounds the scope to daily granularity. It distinguishes itself from stock_quote and market_summary by name and by what data each returns.

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

Usage Guidelines5/5

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

Explicit when-to-use ('requests about history: trends, ranges, chart data over days-to-a-year') paired with explicit when-not alternatives ('for the latest price alone use stock_quote (much faster); for market-wide indices use market_summary'). The agent has a clear routing rule with a stated performance reason.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.