Skip to main content
Glama
InvestBrain

InvestBrain

tushare_get_daily_price

Fetch daily OHLCV stock price data for a specified code and date range to support investment analysis, screening, and backtesting.

Instructions

Get daily price data for a stock (Tushare API: daily).

Args:
    ts_code: Tushare stock code (e.g., "600519.SH" for 贵州茅台)
             Format: {code}.{exchange} (SH=Shanghai, SZ=Shenzhen)
    start_date: Start date in YYYYMMDD format (default: 30 days ago)
    end_date: End date in YYYYMMDD format (default: today)

Returns:
    dict: OHLCV data with date, open, high, low, close, volume, amount

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": {
      "ts_code": "<ts_code>"
    },
    "name": "tushare_get_daily_price"
  }
}

Input Schema

NameRequiredDescriptionDefault
ts_codeYes
end_dateNo
start_dateNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.5/5.0
Behavior3/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 disclose useful behavior: default date window (30 days ago to today), date format, and the returned OHLCV fields. It omits Tushare-specific operational traits such as token/authentication requirements (a sibling tool checks token status), rate limits, and history-depth limits.

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 one-line purpose followed by Args/Returns sections; every line carries information. The docstring formatting is slightly verbose but nothing is wasted.

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

Completeness3/5

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

For a 3-parameter tool with no annotations and no output schema, the description covers inputs and return fields adequately. It falls short on operational context: authentication/token prerequisites, rate limits, and whether the date range is inclusive or capped are all unstated.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 0% (only titles and empty defaults), so the description must compensate, and it does fully: ts_code format with a concrete example and exchange codes (SH/SZ), plus YYYYMMDD formats and defaults for both date parameters. An agent could call this correctly without ever reading 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 daily price data for a stock') and anchors it to the Tushare 'daily' endpoint, so the agent knows exactly what data comes back. It does not explicitly distinguish itself from siblings like tushare_get_weekly_price, tushare_get_realtime_quote, or market_get_stock_history, leaving the 'daily' qualifier to do the differentiation implicitly.

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 explicit when-to-use or when-not-to-use guidance. The description never mentions the sibling tools that overlap heavily (weekly price, realtime quote, market history) nor states that this is for historical end-of-day data only, so the agent must infer routing from the name alone.

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

Deploy Server

Other Tools