Skip to main content
Glama

China Exchange Data

Ashares Index Bars

ashares_index_bars
Read-onlyIdempotent

上证/深证指数日线周线年线, Daily, weekly, or annual OHLC + volume + turnover bars for a major China A-share index: 上证指数 Shanghai Composite (000001), 上证50 (000016), 沪深300 CSI 300 (000300), 科创50 STAR50 (000688) from SSE; 深证成指 Shenzhen Component (399001), 创业板指 ChiNext (399006) from SZSE. Weekly history goes back up to 6 years (312 bars); years returns one bar per calendar year (close + year-over-year pct change) for multi-year questions like "5 years of annual closes for CSI 300". Answers "上证指数000001最近10个交易日OHLC", "Shanghai Composite last 10 days", "深证成指周线", "ChiNext index history", "CSI 300 annual close 2020-2025". Source: SSE yunhq public quote system (000xxx/999xxx indices) + SZSE ssjjhq history API (399xxx indices), both keyless.

Example tool call

This call uses example arguments supplied in the tool’s input schema.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "days": 10,
      "index": "000001"
    },
    "name": "ashares_index_bars"
  }
}

Input Schema

NameRequiredDescriptionDefault
daysNoNumber of daily bars to return, 1-250 (default 10). Ignored if weeks or years is set.
indexNoIndex code: 000001 (上证指数), 000016 (上证50), 000300 (沪深300), 000688 (科创50), 399001 (深证成指), 399006 (创业板指). Default 000001.
weeksNoNumber of weekly bars to return, 1-312 (up to ~6 years). Overrides days when set; ignored if years is set.
yearsNoNumber of annual bars to return, 1-40, one bar per calendar year with close and year-over-year pct_change. Overrides weeks and days when set. E.g. years:6 for 2020-2025 inclusive.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / properties / years / description
      Previous value: -"Number of annual bars to return, 1-40 — one bar per calendar year with close and year-over-year pct_change. Overrides weeks and days when set. E.g. years:6 for 2020-2025 inclusive."New value: +"Number of annual bars to return, 1-40, one bar per calendar year with close and year-over-year pct_change. Overrides weeks and days when set. E.g. years:6 for 2020-2025 inclusive."
  2. First observed

TDQS

A3.9/5.0
Behavior3/5

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

Annotations already declare readOnly, idempotent, non-destructive and open-world, so the safety profile is covered. The description does add genuine operational context: keyless access, the upstream sources (SSE yunhq / SZSE ssjjhq) and the recalculation basis, plus the 6-year/312-bar history ceiling. It still says nothing about rate limits, error behavior for an unsupported index code, or response 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 opening clause front-loads the core capability, then layers the index universe, history depth and representative questions. It is dense with bilingual names and codes but each element aids selection or interpretation; a few redundant restatements of override precedence (already in schema) could be trimmed.

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 no output schema, the description must convey what comes back, and it does so at a high level: OHLC plus volume and turnover, with annual bars returning close and YoY change. Source and history-depth limits are also stated. What is missing is field-level return detail and pagination/limit behavior for large requests.

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%, so all four parameters are already documented in the schema, including the override rules. The description mostly restates the index universe and frequency semantics; the only extra meaning is what the annual bar contains (close + year-over-year percent change). That is baseline-level value over the schema.

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?

States a specific verb and resource (Daily/weekly/annual OHLC + volume + turnover bars) scoped strictly to major China A-share indices, enumerating the exact codes (000001, 000016, 000300, 000688, 399001, 399006). An agent can immediately tell this serves index bars rather than individual stock bars, so it is distinguishable from the sibling market-bars tool.

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

Usage Guidelines4/5

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

Gives concrete when-to-use context through example queries (last 10 days OHLC, weekly Shenzhen Component, multi-year annual closes) and explicitly frames `years` as the right choice for multi-year questions. It stops short of naming alternatives or stating exclusions such as 'use the stock-bars tool for individual tickers'.

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.