Skip to main content
Glama
chengzuopeng

Stock SDK MCP Server

by chengzuopeng

get_history_kline

Read-only

Retrieve historical K-line data for A-shares with daily, weekly, or monthly periods. Get open, high, low, close, volume, and percentage change for specific date ranges and adjustment types.

Instructions

获取 A 股历史 K 线数据(日/周/月),包含开高低收、成交量、涨跌幅等

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
adjustNo复权类型: 空=不复权, qfq=前复权(默认), hfq=后复权
periodNoK 线周期: daily=日线(默认), weekly=周线, monthly=月线
symbolYes股票代码,如 "600519" 或 "sh600519"
endDateNo结束日期,格式 YYYYMMDD,如 "20241231"
startDateNo开始日期,格式 YYYYMMDD,如 "20240101"
Behavior4/5

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

The readOnlyHint annotation covers safety, and the description adds useful output content (fields included). It does not disclose pagination, default date ranges, or rate limits, but for a read-only data retrieval tool, the added return-field info justifies a moderate-to-high score.

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

Conciseness5/5

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

The description is a single concise sentence that front-loads the action ('获取') and includes the market, data type, periods, and key fields without redundancy. Every element is informative.

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?

Given the 5-param schema with full documentation and readOnly annotation, the description sufficiently orients an AI agent. It could mention default date ranges or that parameters are optional, but the core functionality is clear. A 4 reflects the minor gap in behavioral defaults.

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?

The schema provides 100% coverage of all five parameters with descriptions and enums, so the description's mention of periods (daily/weekly/monthly) adds no new meaning. Baseline 3 is appropriate as the schema handles parameter documentation.

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 description clearly states the tool retrieves A-share historical K-line data with specific timeframes (daily/weekly/monthly) and included fields (OHLC, volume, change %). This specific verb+resource phrasing distinguishes it from sibling tools for HK/US history K-lines and minute-level data.

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?

The description implies usage for A-share historical K-line data in daily/weekly/monthly periods but does not explicitly mention alternatives such as get_us_history_kline or get_minute_kline. The market qualifier 'A股' provides clear context, but no exclusions or alternative tool references are given.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/chengzuopeng/stock-sdk-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server