Skip to main content
Glama

TickDB Market Data

get_kline

Get historical OHLCV candles, including CN/HK futures open_interest.

    The last candle may still be forming. Adjusted history may change after
    corporate actions; record query time and adjustment mode for backtests.
    Futures normally omit quote_volume. Limit defaults to 100, caps at 1000;
    non-positive limits use 100. start_time must not exceed end_time.
    

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
typeNoProduct type for disambiguation: stock, crypto, forex, indices, futures
limitNoNumber of candles, default 100, max 1000
adjustNoStock price adjustment: none (default), forward, backward; US/HK/CN stocks
symbolYesSingle symbol code, e.g. 'BTCUSDT'
end_timeNoEnd time as Unix milliseconds
intervalYesCandle interval: 1m 3m 5m 15m 30m 1h 2h 4h 1d 1w 1M
start_timeNoStart time as Unix milliseconds

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed7 schema fields changed
    • addedInput schema / properties / adjust
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "description": "Stock price adjustment: none (default), forward, backward; US/HK/CN stocks",
      +  "title": "Adjust"
      +}
    • addedInput schema / properties / end_time / description
      Added value: +"End time as Unix milliseconds"
    • addedInput schema / properties / interval / description
      Added value: +"Candle interval: 1m 3m 5m 15m 30m 1h 2h 4h 1d 1w 1M"
    • addedInput schema / properties / limit / description
      Added value: +"Number of candles, default 100, max 1000"
    • addedInput schema / properties / start_time / description
      Added value: +"Start time as Unix milliseconds"
    • addedInput schema / properties / symbol / description
      Added value: +"Single symbol code, e.g. 'BTCUSDT'"
    • addedInput schema / properties / type / description
      Added value: +"Product type for disambiguation: stock, crypto, forex, indices, futures"
  2. First observed

TDQS

A3.8/5.0
Behavior4/5

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

With no annotations the description carries the full burden, and it does well: discloses that the last candle may still be forming, that adjusted history shifts after corporate actions, and that futures omit quote_volume. It does not state auth/permission needs or rate limits, which is the remaining gap.

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?

Five short sentences, each carrying a distinct operational fact, with the core purpose front-loaded. The odd line wrapping is cosmetic and no sentence is filler, though the limit/time rules could be grouped more tightly.

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?

For a 7-param, no-output-schema read tool, the description covers the return shape (OHLCV plus optional open_interest/quote_volume), staleness, and the limit/time constraints. Missing only guidance on the 'type' disambiguation parameter and sibling routing.

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 coverage is already 100%, so baseline is 3, but the description adds semantics beyond the schema: non-positive limits resolve to 100 (a fallback the schema doesn't document) and the start_time<=end_time constraint. It adds little on 'type' and 'adjust' beyond the schema.

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?

States a specific verb and resource: 'Get historical OHLCV candles', and adds the futures open_interest detail. It distinguishes itself from get_kline_latest implicitly via 'historical', but never names the sibling explicitly, so the agent must infer the boundary.

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

Usage Guidelines3/5

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

Adds useful context about backtests ('record query time and adjustment mode'), which implies analytical/replay usage, and the start_time<=end_time rule. However there is no explicit when-to-use guidance versus get_kline_latest or get_intraday, so selection between them is left to inference.

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.