Skip to main content
Glama
stock-mcp-server

stock-mcp-server

by 1018053166

get_kline

Fetch Chinese stock K-line data by stock code, including daily, weekly, monthly, and minute charts, with configurable period and record count for charting or technical analysis.

Instructions

获取K线数据(日K/周K/月K/分钟线)

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": {
      "stockCode": "<stockCode>"
    },
    "name": "get_kline"
  }
}

Input Schema

NameRequiredDescriptionDefault
countNo获取数量(默认100)
periodNo周期: 101=日K, 102=周K, 103=月K, 1=1分钟, 5=5分钟, 15=15分钟, 30=30分钟, 60=60分钟101
stockCodeYes股票代码

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

C2.9/5.0
Behavior2/5

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

No annotations are supplied, so the description carries the full disclosure burden, yet it says nothing about whether bars are adjusted for splits/dividends, whether the most recent bar is real-time or delayed, how far back history goes, or what happens when count exceeds available history. The only behavioral hint – the period granularities – duplicates the schema enum.

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?

A single short sentence with the resource front-loaded and the granularities in a parenthetical; nothing is wasted. Brevity here borders on under-specification rather than padding, but the structure itself is clean.

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

Completeness2/5

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

For a market-data retrieval tool with no annotations and no output schema, the description should at least characterize the returned bar shape (OHLCV fields, ordering, timestamp convention). It provides nothing on the response, so an agent cannot anticipate what it will receive or how to interpret it.

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%, with each parameter documented including the full period code mapping, so the schema already does the heavy lifting. The description adds no format or semantic detail beyond restating the period options, which meets the baseline 3.

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 names a specific resource and verb ('获取K线数据' – get candlestick data) and enumerates the supported granularities (daily/weekly/monthly/minute bars), so the agent knows exactly what is returned. It does not, however, distinguish itself from similarly-scoped siblings such as get_stock_realtime or get_technical_indicators, leaving the boundary to inference.

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?

There is no statement of when to use this tool versus the many market-data siblings, no prerequisites (does it need a valid exchange prefix on stockCode?), and no exclusions. The purpose is inferable, but usage guidance is entirely absent.

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