Skip to main content
Glama
lolifamily

ashare-mcp

by lolifamily

A-Share MCP Server

A-Share (中国A股) 市场数据 MCP 服务器,基于 baostock 数据源。

Vibe Coded -- 本项目由 AI 辅助编写 (vibe coding),代码质量和计算公式未经严格审计。 估值模型 (DCF / DDM / PEG)、技术指标、风险指标等涉及的数学公式可能存在错误, 产出的数字仅供学习参考,请勿作为任何投资决策的依据。 如果你发现了 bug,欢迎提 issue 或 PR。


功能概览

分类

工具

行情数据

K线、快照、复权因子、股票列表、行业分类、交易日历、分红

财务数据

利润、增长、资产负债、现金流、杜邦分析、营运能力

财务报表 (akshare 可选)

资产负债表、利润表、现金流量表 (绝对值全科目)、净负债

指数成分

沪深300、上证50、中证500

宏观数据

货币供应量 (M0/M1/M2)、存贷款利率、存款准备金率

技术分析

MACD、RSI、KDJ、BOLL、WR、CCI、ATR、ADX、OBV、MFI、均线 (SMA/EMA)

估值分析

PE/PB/PS 历史分位、行业对比、DCF、DDM、PEG

风险指标

Beta、Sharpe、最大回撤、波动率、信息比率

Related MCP server: ashare-mcp

快速开始

需要 Python >= 3.12 和 uv

# 克隆
git clone <repo-url>
cd ashare-mcp

# 安装依赖
uv sync

# 启动 (stdio 模式,供 MCP 客户端对接)
uv run python -m ashare_mcp

# 或 HTTP 模式
uv run python -m ashare_mcp --transport http --port 3000

可选: akshare 扩展

# 安装 akshare 可选依赖后多出 2 个工具 + DCF 自动改用真实现金流/Capex/净负债
uv sync --extra akshare

安装后:

  • 新增 get_financial_statement (参数 statement: balance/income/cash_flow) 和 get_net_debt 工具 (数据源: 东方财富)

  • calculate_dcf_valuation 自动改用真实经营现金流 (NETCASH_OPERATE) 和 Capex (CONSTRUCT_LONG_ASSET),net_debt 自动从资产负债表计算;capex_to_ocf_ratio 仍需提供,作为 akshare 运行时失败/未安装时的回退估算

  • data_provenance 字段如实标注数据来源

  • 不安装则行为与之前完全一致

注意事项

  • 数据来源为 baostock 免费接口,无需注册、无需 API Key

  • baostock 仅提供 A 股历史数据,不提供实时行情

  • 技术指标需要足够的历史数据做 warmup(如 MACD 至少需要 33 个交易日),窗口过短会返回 null

  • 复权因子仅在除权除息日存在记录,非除权日期查询会返回空

  • DCF 中的 OCF 是由 MBRevenue * CFOToOR 推算的(约 2% 精度),Capex 需调用者自行提供;安装 akshare 后自动改用真实数据

  • DDM 的股利 CAGR 仅上限 clamp 到 20%(防过度外推),负 CAGR 透传

  • akshare 数据源走东方财富网页接口,有反爬/限频,不保证永久稳定

Credits

Available Tools

25 tools
calculate_dcf_valuationA

Simplified DCF valuation. OCF derived as MBRevenue * CFOToOR (~2% precision).

FCF = OCF * (1 - capex_to_ocf_ratio). Caller must supply capex_to_ocf_ratio because baostock provides no Capex data.

Enterprise value (EV) is always returned. To derive equity value and per-share intrinsic value, caller must provide net_debt, which baostock does NOT publish — it must come from the balance sheet (interest-bearing debt minus cash & equivalents). Without it, only EV is returned and the caller can compute equity = ev - (their own net_debt).

When akshare is installed and reachable, real operating cash flow (NETCASH_OPERATE) and real capex (CONSTRUCT_LONG_ASSET) are used automatically (capex_to_ocf_ratio is then ignored), and net_debt is computed from the balance sheet if not provided. If akshare is absent or fails at runtime (rate-limit, anti-scrape), the calculation falls back to baostock estimation using capex_to_ocf_ratio. data_provenance indicates which path.

Uses a fixed 5-year FCF history, degrading gracefully to as few as 2 years when reports are missing.

forecast_growth clamps fcf_cagr to growth_clamp_bounds ([-5%, 15%]); growth_clamped reports which bound (if any) was hit. Read it before using forecast_growth -- a raw CAGR outside the band was silently overridden.

intermediates.fcf_quality reports negative_years / sign_changes / min / max on the historical FCF series; fcf_cagr is endpoint-anchored and does not reflect intra-period volatility.

Args: code: Stock code. discount_rate: WACC / discount rate, e.g. 0.10. terminal_growth_rate: Perpetual growth rate, e.g. 0.025. capex_to_ocf_ratio: Capex as a fraction of OCF. Always required, but used only on the baostock fallback path; ignored when akshare's real capex is available. net_debt: Interest-bearing debt minus cash & equivalents (CNY). Negative = net cash position. Required for per-share valuation. forecast_years: Projection period (must be in [1, 20]).

ParametersJSON Schema
NameRequiredDescriptionDefault
codeYes
discount_rateYes
terminal_growth_rateYes
capex_to_ocf_ratioYes
net_debtNo
forecast_yearsNo

TDQS

A4.5/5.0
Behavior5/5

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

With no annotations, the description fully discloses behavioral traits: OCF approximation precision, fallback from akshare to baostock, clamping of forecast_growth, graceful degradation of history, and reporting of fcf_quality. No annotation contradiction.

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 description is long but well-structured with clear paragraphs and a bullet-like list for arguments. Front-loaded with core purpose. Some redundancy could be trimmed, but overall it earns its length.

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

Completeness5/5

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

Given the tool's complexity (multiple data sources, fallback, clamping, intermediate quality metrics), the description covers all critical aspects: return values (EV, equity), data provenance, and edge cases. No output schema, but the narrative sufficiently explains outputs.

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 has no descriptions (0% coverage), so the description must compensate. It provides extensive meaning for each parameter: data sources, constraints (e.g., forecast_years must be 1-20), and usage conditions (e.g., capex_to_ocf_ratio ignored when akshare available).

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 it is a 'Simplified DCF valuation' and explains the derivation of OCF, FCF, and enterprise value. It distinguishes itself from sibling tools like calculate_ddm_valuation by focusing on DCF methodology.

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?

The description provides detailed usage context (e.g., fallback behavior, prerequisites for net_debt), but does not explicitly state when to use this tool versus alternatives like DDM or PEG ratio. Implicit guidance exists but lacks explicit comparisons.

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

calculate_ddm_valuationA

DDM (Dividend Discount Model) valuation.

Uses dividCashPsBeforeTax from baostock. Auto-sums semicolon-separated multi-payouts. Current price from latest K-line close. Excludes the current calendar year, whose dividend bucket is usually incomplete mid-year. Buckets are by announcement year, so a prior fiscal year's final payout and the next year's interim can land in the same bucket, distorting dividend_cagr.

forecast_growth caps dividend_cagr at growth_clamp_bounds.max (20%); negative CAGR passes through unchanged. growth_clamped is "exceeded_max" if the cap fired, else null.

Args: code: Stock code. discount_rate: Required rate of return, e.g. 0.10. terminal_growth_rate: Perpetual growth rate, e.g. 0.025. years_back: Years of dividend history to use. forecast_years: Projection period (must be in [1, 20]).

ParametersJSON Schema
NameRequiredDescriptionDefault
codeYes
discount_rateYes
terminal_growth_rateYes
years_backNo
forecast_yearsNo

TDQS

A4.4/5.0
Behavior5/5

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

With no annotations, the description fully discloses behavioral details: data source, multi-payout handling, year exclusion, bucket distortions, growth cap logic, and growth_clamped field. This provides comprehensive transparency.

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 description is well-structured with clear sections and bullet points, front-loading key information. It is somewhat lengthy but every sentence adds value, balancing detail and clarity.

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

Completeness5/5

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

Given the complexity of DDM, no output schema, and 0% schema coverage, the description is remarkably complete. It explains assumptions, calculation details, and parameter constraints, leaving little ambiguity for the agent.

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 0%, but the description adds meaning for four of five parameters: provides examples for discount_rate and terminal_growth_rate, and a range for forecast_years. It lacks detail for code and years_back, but overall compensates well.

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 it performs DDM valuation using specific data sources and details the methodology. The tool name itself distinguishes it from siblings like calculate_dcf_valuation.

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?

The description explains how the tool works (e.g., auto-summing multi-payouts, excluding current year) but does not explicitly state when to use it over alternatives or when not to use it. It implies suitability for dividend-paying stocks but lacks direct guidance.

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

calculate_peg_ratioA

Calculate PEG = current PE_TTM / G, with G the latest published YoY net profit growth.

PE is the latest available quote; G is the most recently disclosed YoY growth, returned as growth_period (statDate) and growth_period_type (Q1/H1/9M/FY). baostock's YOYNI is a ratio (0.1858 = +18.58% YoY); PEG uses the percent number (18.58).

PEG is undefined and returns peg=None when:

  • PE == 0 (no TTM earnings data: index / non-equity, not loss-making)

  • PE < 0 (loss-making company; PE has no valuation meaning)

  • no growth report has been published yet (fresh IPO / data delay)

  • YoY growth <= 0 (PEG is a growth-stock metric; declining earnings yield a negative or nonsensical value that LLMs would misread as cheap)

Args: code: Stock code.

ParametersJSON Schema
NameRequiredDescriptionDefault
codeYes

TDQS

A3.9/5.0
Behavior4/5

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

With no annotations, the description clearly explains data sources, unit conversions (YOYNI ratio vs percent), and return values (peg=None under conditions), though could be more explicit about output structure.

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?

Well-structured with formula, explanation, and args section; no fluff, though slightly lengthy.

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?

Covers key aspects like undefined conditions and output fields (growth_period, growth_period_type) but lacks explicit return structure without an output schema.

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

Parameters2/5

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

The single parameter 'code' is described only as 'Stock code' with no format details, adding minimal value beyond the schema's type and name.

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 states the formula for PEG and specifies the inputs (PE_TTM, YoY growth), making the purpose clear and distinct from sibling tools like DCF or DDM valuation.

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?

Provides extensive conditions when PEG is undefined (PE==0, PE<0, no growth report, growth<=0) with reasoning, but does not explicitly compare to alternative valuation tools for when to use PEG vs others.

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

calculate_risk_metricsA

Calculate risk metrics: beta, Sharpe, max drawdown, volatility, correlation.

Args: code: Stock code. benchmark_code: Benchmark index, default 'sh.000300' (CSI 300). lookback_days: Calendar days to look back. 365 ≈ 1 year, 730 ≈ 2 years. Must yield >= 30 trading-day bars (~45+ calendar days, more if the span crosses a long holiday) or the call is rejected. ~245 calendar days ≈ 1 trading year (CN A-share). risk_free_rate: Annualized risk-free rate for Sharpe ratio. Default ~3% (approximate CN 10Y bond yield); override for non-CN markets.

ParametersJSON Schema
NameRequiredDescriptionDefault
codeYes
benchmark_codeNosh.000300
lookback_daysNo
risk_free_rateNo

TDQS

A4.2/5.0
Behavior3/5

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

No annotations provided. Description reveals the constraint that lookback_days must yield >=30 trading-day bars or call is rejected, but does not disclose other behaviors like read-only nature or side effects.

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 with purpose, then clear parameter docs. Slightly verbose but every sentence adds value. Could be more concise without losing information.

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?

Covers all parameters with defaults and usage notes, lists returned metrics. No output schema, but description adequately explains what to expect. Missing prerequisites or data source info, but sufficient for a focused financial metrics tool.

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?

With 0% schema coverage, description fully compensates by explaining each parameter: code (stock code), benchmark_code (default and meaning), lookback_days (conversion to trading days, minimum constraint), risk_free_rate (default and context).

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?

Description clearly states it calculates risk metrics (beta, Sharpe, max drawdown, volatility, correlation) and distinguishes from siblings like calculate_dcf_valuation, which are valuation-focused.

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?

Explicitly states what the tool computes and provides defaults for benchmark and risk-free rate, implying usage context. However, it does not explicitly say when not to use it or compare to alternatives.

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

compare_industry_valuationA

Compare a stock's valuation (PE/PB/PS) against its industry peers.

Behavior contract:

  • Raises NoDataFoundError if code is absent from the industry table for date, has no industry classification (delisted / legacy stock), or has no K-line in the lookback window — it will not return a result without the target.

  • Peers whose K-line is missing are listed in peer_coverage.skipped with the reason. Industry statistics exclude the target itself and use POSITIVE values only; the center stat is trimmed_mean (10% per tail, >=1 each side), not a raw mean. industry_stats[metric].count reports peers per statistic.

Args: code: Target stock code. date: Comparison date 'YYYY-MM-DD'. Defaults to latest.

ParametersJSON Schema
NameRequiredDescriptionDefault
codeYes
dateNo

TDQS

A4.8/5.0
Behavior5/5

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

With no annotations provided, the description fully discloses behavioral traits: raises NoDataFoundError for missing data, lists skipped peers with reasons, excludes target from statistics, and uses trimmed mean. All critical behaviors are transparent.

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 concise yet comprehensive, with a front-loaded purpose statement and a well-organized behavior contract. It uses markdown-style headings and bullet points, making it easy to parse. Every sentence adds value.

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

Completeness5/5

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

Given the tool's simplicity (2 parameters, no output schema), the description is complete: it covers input semantics, error conditions, peer coverage output, and statistical methodology. No gaps remain.

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 description coverage is 0%, so the description must add meaning. It explains 'code' as the target stock code, 'date' as comparison date with format and default behavior ('YYYY-MM-DD' and defaults to latest). This fully compensates for the lack of schema descriptions.

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's purpose: compare a stock's valuation (PE/PB/PS) against industry peers. The verb 'compare' and resource 'valuation' are specific, and the function distinguishes itself from siblings like get_valuation_metrics or calculate_dcf_valuation by focusing on peer comparison.

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 includes a detailed behavior contract explaining when errors occur and how peer coverage is handled. It implicitly guides usage for stocks with industry classification and data availability, but does not explicitly direct when to use this tool over alternatives.

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

get_adjust_factor_dataA

Fetch adjustment factor data for calculating adjusted prices.

Factors exist only on ex-div / ex-rights dates; a window with none returns an empty list.

Args: code: Stock code. start_date: 'YYYY-MM-DD'. end_date: 'YYYY-MM-DD'.

ParametersJSON Schema
NameRequiredDescriptionDefault
codeYes
start_dateYes
end_dateYes

TDQS

A4/5.0
Behavior3/5

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

No annotations provided, so description carries full burden. It mentions empty list behavior but lacks details on read-only nature, authentication, or rate 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?

The description is concise with a clear purpose line and structured Args section. Every sentence adds value, though could be slightly more compact.

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?

Given no annotations or output schema, it covers basics and edge case but misses explanation of adjustment factors significance and output format.

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?

With 0% schema coverage, the description adds meaning by specifying stock code and date format (YYYY-MM-DD) for the required params, though code format is not detailed.

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 fetches adjustment factor data for calculating adjusted prices, which is specific and distinct from siblings like get_historical_k_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?

It explains that factors only exist on ex-div/ex-rights dates and returns empty list if none, guiding when to use it and what to expect. However, no explicit when-not or alternatives.

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

get_all_stockA

Search stocks by name. Returns matching code, code_name, and tradeStatus.

Args: query: Search keyword matched against code_name (substring, case-insensitive). An empty string matches every row and returns the full market (~5000+ stocks, ~1 MB). date: Date 'YYYY-MM-DD'. Defaults to the latest trading date.

ParametersJSON Schema
NameRequiredDescriptionDefault
queryYes
dateNo

TDQS

A3.7/5.0
Behavior3/5

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

No annotations provided, but description warns about empty query returning full market (~5000+ stocks, ~1 MB), which is helpful. Does not disclose other behavioral traits (e.g., read-only, rate limits).

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?

Two concise paragraphs, first sentence communicates purpose, args are clearly listed with details. No unnecessary text.

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 no annotations and no output schema, description covers purpose, arguments, return fields, and a data size caveat. Could mention return type (list) but otherwise complete.

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?

With 0% schema coverage, description fully explains both parameters: query is substring case-insensitive search, empty string returns all; date format and default are specified. Adds significant meaning.

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 'Search stocks by name' as verb+resource, and lists return fields (code, code_name, tradeStatus). Clear but does not explicitly distinguish from sibling tools like get_stock_basic_info or get_stock_snapshot.

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?

No guidance on when to use this tool vs siblings (e.g., get_stock_industry for industry filtering). Missing context about prerequisites or alternatives.

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

get_benchmark_rate_dataA

Fetch PBoC benchmark deposit or loan rates within a date range.

rate_type:

  • 'deposit': benchmark deposit rates — demand plus fixed-term 3-month .. 5-year.

  • 'loan': benchmark loan rates — 6-month .. above-5-year, plus mortgage rates.

Args: rate_type: Which rate table to fetch. start_date: Optional 'YYYY-MM-DD'. end_date: Optional 'YYYY-MM-DD'.

ParametersJSON Schema
NameRequiredDescriptionDefault
rate_typeYes
start_dateNo
end_dateNo

TDQS

A3.8/5.0
Behavior3/5

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

No annotations are provided, so the description bears the full burden. It explains the structure of rate_type (deposit and loan with term breakdowns) but does not disclose data freshness, authorization needs, rate limits, or output format. Some behavioral context is added, but significant gaps remain.

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 description is concise and well-structured: a one-line purpose, a bullet for rate_type details, and an Args list. It repeats some schema info but adds value. Could be slightly tighter by removing the Args line that merely restates names.

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?

With three parameters (one required) and no output schema, the description explains the required parameter well but does not describe the return format, error cases, or data availability. This leaves the agent partially informed.

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 description coverage is 0%, so the description must compensate. It explains rate_type in detail with enum values and their included terms. For start_date and end_date, it adds the format hint 'YYYY-MM-DD' and notes they are optional, which is helpful but minimal.

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 'Fetch PBoC benchmark deposit or loan rates within a date range,' specifying verb, resource, and scope. It distinguishes between deposit and loan rate types, making the tool's purpose unambiguous among sibling tools.

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?

The description does not explicitly state when to use this tool versus alternatives. While it implies usage for fetching benchmark rates, no guidance on when-not-to-use or comparisons to siblings like get_money_supply_data or get_required_reserve_ratio_data is provided.

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

get_dividend_dataA

Fetch a year's dividends: annual cash total plus every payout's detail.

A year with several distributions has one entry per payout in payouts (full detail). annual_cash_per_share_pretax is their summed dividCashPsBeforeTax — the yearly total, so callers needn't add across rows. Within a single payout, semicolon-separated multi-values in the cash-dividend fields are already summed by the client.

annual_cash_per_share_pretax is None when the year had distributions but no cash (pure stock dividend / capital reserve conversion); read each payout's dividStocksPs / dividReserveToStockPs for those.

Args: code: Stock code. year: 4-digit year, e.g. '2023'. year_type: 'report' (announcement year) or 'operate' (ex-dividend year).

Returns: {code, year, annual_cash_per_share_pretax, payout_count, payouts}.

ParametersJSON Schema
NameRequiredDescriptionDefault
codeYes
yearYes
year_typeNoreport

TDQS

A4.7/5.0
Behavior5/5

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

No annotations are provided, so the description carries full burden. It details the behavior: returns annual total and payout details, explains that annual_cash_per_share_pretax is summed and can be None for non-cash distributions, and describes how semicolon-separated values are already summed. This is comprehensive.

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 description is well-structured with a summary, details, Args, and Returns sections. It is informative but contains slight redundancy (explaining annual_cash_per_share_pretax twice). Overall concise and front-loaded.

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

Completeness5/5

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

There is no output schema, so the description must cover return value structure. It does so explicitly: '{code, year, annual_cash_per_share_pretax, payout_count, payouts}'. It also addresses edge cases (None for non-cash) and clarifies multi-value handling. Complete for 3 parameters with no output schema.

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 has 0% description coverage. The description includes an 'Args:' section that explains each parameter's meaning and type (e.g., year is '4-digit year', year_type is 'report' or 'operate'). This adds crucial value beyond the bare 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?

The description states explicitly 'Fetch a year's dividends: annual cash total plus every payout's detail.' It uses specific verbs and resources, and clearly distinguishes from sibling tools which cover different financial data (valuation, balance sheet, etc.).

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 provides guidance on when to use the tool (to get dividend data) and explains how to interpret results, including handling of non-cash distributions and multi-values. However, it does not explicitly state when not to use or mention alternatives, though siblings are unrelated.

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

get_financial_indicatorsA

Fetch a quarterly financial report; report selects which statement.

baostock splits quarterly fundamentals across six statements, each with a distinct field set. All values are cumulative-from-year-start: quarter=1 is 3-month, 2 is H1 (6-month), 3 is 9-month, 4 is FY (12-month).

report:

  • 'profit': profitability — roeAvg, npMargin, gpMargin, netProfit, epsTTM, MBRevenue, totalShare.

  • 'operation': turnover ratios — NRTurnRatio, INVTurnRatio, CATurnRatio, AssetTurnRatio (and matching *Days).

  • 'growth': YoY growth rates — YOYNI, YOYEPSBasic, YOYEquity, YOYAsset, YOYPNI.

  • 'balance': balance-sheet ratios — currentRatio, quickRatio, liabilityToAsset, assetToEquity. liabilityToAsset is rederived as 1 - 1/assetToEquity to work around stale upstream values (falls back to the raw value only when assetToEquity is null or zero).

  • 'cash_flow': cash-flow ratios — CFOToOR, CFOToNP, CFOToGr, CAToAsset.

  • 'dupont': DuPont ROE decomposition — dupontROE, dupontAssetTurn, dupontNitogr, dupontTaxBurden, dupontEbittogr.

Args: code: Stock code, e.g. 'sh.600519'. report: Which statement to fetch (see above). year: 4-digit year, e.g. '2024'. quarter: 1, 2, 3, or 4.

ParametersJSON Schema
NameRequiredDescriptionDefault
codeYes
reportYes
yearYes
quarterYes

TDQS

A4.2/5.0
Behavior4/5

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

Discloses that values are cumulative-from-year-start, the workaround for liabilityToAsset, and the distinct field sets for each report. Since no annotations are provided, the description carries the burden and does so well, though it omits output format or authorization needs.

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 description is well-structured with bullet sections for each report, but it is somewhat verbose. The initial sentence clearly states the purpose, and the detailed field lists are helpful, though slightly lengthy.

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 4 required parameters and no output schema, the description provides sufficient details to use the tool correctly, including data quirks and report options. It lacks only the return data structure, but that is partially mitigated by listing fields.

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?

With 0% schema coverage, the description fully compensates by explaining the code example, listing all enum values for report with their fields, specifying year format, and indicating quarter values 1-4. Every parameter's meaning is clarified beyond 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?

Specifically states 'Fetch a quarterly financial report' with the `report` parameter selecting the statement. The description lists each report type and its fields, clearly distinguishing this from sibling tools like get_financial_statement.

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?

Provides context about cumulative values and quarter meaning, and explains the data source's structure. However, it does not explicitly state when to use this tool versus alternatives like get_financial_statement, nor does it mention when not to use it.

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

get_financial_statementA

Fetch a full financial statement (all periods, all columns) from EastMoney via akshare.

statement selects which one (each is a separate EastMoney endpoint — one fetch per call, so request only the statement you need):

  • "balance" 资产负债表 — point-in-time snapshot per report date.

  • "income" 利润表 — key fields OPERATE_INCOME, NETPROFIT, ...

  • "cash_flow" 现金流量表 — key fields NETCASH_OPERATE (operating cash flow), CONSTRUCT_LONG_ASSET (capex).

Returns raw EastMoney field names (English uppercase keys), rows ordered most-recent-first (newest period at index 0). Columns entirely empty across the returned periods are dropped.

IMPORTANT — for "income" and "cash_flow", quarterly values are cumulative YTD (year-to-date), not single-quarter:

  • Q1 (一季报) = 3 months

  • H1 (半年报) = 6 months

  • Q3 (三季报) = 9 months

  • FY (年报) = 12 months Inspect REPORT_DATE_NAME before comparing across periods. To get a single quarter, subtract the previous cumulative period (e.g. Q3_single = Q3 - H1). The balance sheet is a snapshot, so this does not apply to it.

Args: code: Stock code in baostock format, e.g. 'sh.600519'. statement: Which statement — "balance", "income", or "cash_flow". periods: How many most-recent report periods to return (default 8 ≈ 2 years of quarterly filings). Raise only when you need older periods — the full history is large.

ParametersJSON Schema
NameRequiredDescriptionDefault
codeYes
statementYes
periodsNo

TDQS

A4.7/5.0
Behavior5/5

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

No annotations are provided, so the description carries the full burden. It discloses that returns are raw EastMoney field names, rows ordered most-recent-first, empty columns dropped, and the critical YTD cumulative behavior for income and cash_flow. This is thorough and honest about the tool's behavior.

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 description is moderately long but well-organized with sections, bullet points, and bolded emphasis. Every sentence provides necessary detail; there is no fluff. It could be slightly shorter, but the complexity of the data warrants the length.

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

Completeness5/5

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

Given no output schema, the description explains the return structure (raw field names, row order, dropped columns) and how to interpret the data (cumulative YTD, subtraction for single quarters). It covers all aspects a user needs to understand the output, making the tool useable without external documentation.

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?

The input schema has no descriptions (0% coverage), so the description must add meaning. It provides the stock code format, explains each statement enum value, gives default period count recommendation, and warns about raising period only when needed. This far exceeds what the schema offers.

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 specifies that the tool fetches a full financial statement from EastMoney via akshare, listing all statement types and their content. It distinguishes from sibling tools like get_balance_data by emphasizing that this returns all columns and periods in one call, and it provides concrete details on field names and ordering.

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?

It advises to request only the needed statement because each fetch is a separate endpoint. It also explains the cumulative nature of income and cash flow data, implicitly guiding when to use this vs. calculating single-quarter values. However, it does not explicitly state when NOT to use this tool or list alternatives beyond the sibling names.

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

get_historical_k_dataA

Fetch historical K-line (OHLCV + valuation) data for a Chinese A-share stock.

Args: code: Stock code in baostock format, e.g. 'sh.600000', 'sz.000001'. start_date: Start date 'YYYY-MM-DD'. end_date: End date 'YYYY-MM-DD'. frequency: 'd' daily, 'w' weekly, 'm' monthly, '5'/'15'/'30'/'60' minutes. adjust_flag: '1' backward/后复权, '2' forward/前复权, '3' unadjusted/不复权 (default '3'). fields: Comma-separated field list. Defaults to all standard fields.

ParametersJSON Schema
NameRequiredDescriptionDefault
codeYes
start_dateYes
end_dateYes
frequencyNod
adjust_flagNo3
fieldsNo

TDQS

A3.6/5.0
Behavior3/5

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

No annotations, so description must disclose behavior. It explains parameters and defaults but doesn't mention data source limitations, rate limits, or error handling. Adequate but not thorough.

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?

Well-structured with summary line followed by argument list. Slightly verbose but front-loaded with purpose. Could be trimmed slightly.

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?

No output schema, so description should explain return format. It doesn't. Parameter documentation is good but lacks behavioral context like data limits or pagination. Adequate for a 6-param tool with 3 required.

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 description coverage is 0%, but description provides detailed explanations for each parameter (code format, date format, frequency options, adjust_flag choices, fields default). Adds significant meaning beyond schema types.

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?

Description clearly states 'Fetch historical K-line (OHLCV + valuation) data for a Chinese A-share stock' – specific verb and resource. Distinct from sibling valuation and financial data tools.

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?

No guidance on when to use this tool vs alternatives like get_stock_basic_info or get_technical_indicators. No exclusions or context provided.

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

get_index_constituentsA

Fetch constituent stocks of a major A-share index.

index:

  • 'sz50': SSE 50 (上证50).

  • 'hs300': CSI 300 (沪深300).

  • 'zz500': CSI 500 (中证500).

Args: index: Which index's constituents to fetch. date: Optional date 'YYYY-MM-DD'. Defaults to latest.

ParametersJSON Schema
NameRequiredDescriptionDefault
indexYes
dateNo

TDQS

A3.6/5.0
Behavior2/5

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

No annotations provided. The description does not disclose read-only nature, data source freshness, or other behavioral traits beyond parameters. It mentions default date but not limitations.

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?

Description is concise: one-line purpose followed by structured parameter details. No unnecessary words. Front-loaded.

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?

No output schema provided, yet description does not mention return type or structure. Given the tool's complexity (fetching index constituents), expectations on response are unclear. Missing context on data delay or error cases.

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 0%, but description explains both parameters: index enum values with full names, and date format with default. This adds significant value beyond 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?

The description clearly states 'Fetch constituent stocks of a major A-share index', using a specific verb and resource. It distinguishes from siblings like get_all_stock by focusing on index constituents.

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?

No explicit guidance on when to use this tool versus alternatives. The description implies usage for fetching index constituents but does not mention exclusions or related tools.

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

get_latest_trading_dateA

Most recent trading date with K-line data published. Returns 'YYYY-MM-DD'.

Probes CSI 300 (sh.000300) directly and returns the date of its latest available daily bar. This is the safe anchor date for follow-up K-line queries — guaranteed to have data, regardless of wall-clock time. On a trading day before market close, today's bar is not yet published, so this returns the previous trading date.

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

TDQS

A4.7/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. It discloses that it probes CSI 300, returns a date string, and is safe (read-only). It could add detail on return format consistency, but it's sufficient for a simple tool.

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 concise and well-structured: front-loaded with the main result and format, followed by context on usage and edge cases. Every sentence adds value without redundancy.

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

Completeness5/5

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

Despite no output schema, the description explains the return format and the tool's behavior comprehensively for a zero-parameter tool. It covers purpose, usage context, and edge case (before market close), making it complete.

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?

No parameters exist, so schema coverage is 100%. The description adds value by explaining the semantics of the output (date format, anchor usage), which is appropriate for zero-parameter tools.

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 returns the most recent trading date with K-line data published, in YYYY-MM-DD format. It specifies the source (CSI 300) and positions it as a safe anchor date, distinguishing it from sibling tools like get_trade_dates.

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

Usage Guidelines5/5

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

Explicitly tells when to use this tool: as a safe anchor for follow-up K-line queries, guaranteed to have data regardless of wall-clock time. Also explains when today's bar is not yet published, providing clear guidance on timing.

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

get_money_supply_dataA

Fetch money supply data (M0, M1, M2) at monthly or yearly frequency.

freq:

  • 'month': monthly series — m0Month/m1Month/m2Month plus YOY and ChainRelative. Dates are 'YYYY-MM'.

  • 'year': year-end balances — m0Year/m1Year/m2Year plus YearYOY. Dates are 'YYYY'.

Args: freq: 'month' for the monthly series, 'year' for year-end balances. start_date: Optional. Format matches freq: 'YYYY-MM' (month) or 'YYYY' (year). end_date: Optional, same format as start_date.

ParametersJSON Schema
NameRequiredDescriptionDefault
freqYes
start_dateNo
end_dateNo

TDQS

A4.1/5.0
Behavior3/5

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

Without annotations, the description describes the tool as fetching data (read operation) and details the behavior of date formats per frequency. However, it does not disclose any rate limits, authentication needs, data volume, or error handling, which would be expected for full transparency.

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 concise, front-loaded with the core purpose, and uses a clear Args section for parameter details. Every sentence adds value with no redundancy or wasted words.

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?

The description thoroughly covers the input parameters and hints at output fields (YOY, ChainRelative, YearYOY). However, without an output schema, a more explicit description of the return structure would improve completeness. Given the tool's simplicity, it is largely adequate.

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?

The description adds significant meaning beyond the input schema by explaining the meaning of each freq value ('month' vs 'year'), the associated series names, and the date format dependency. Schema coverage is 0%, so the description fully compensates with detailed parameter explanations.

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 verb 'fetch', the resource 'money supply data (M0, M1, M2)', and the frequency options (monthly/yearly). This distinguishes it from sibling tools which focus on company-specific financial data or valuation.

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?

The description explains how to use the parameters (freq, start_date, end_date) and date formatting, but does not provide explicit guidance on when to use this tool over alternatives or when not to use it. Sibling tools have different domains, so the context is implicit, but not stated.

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

get_moving_averagesA

Calculate SMA and EMA for multiple periods over the requested date range.

Returns one row per trading day in [start_date, end_date]. Warmup is auto-prefetched, so values inside the range are not null from warmup. A period exceeding the stock's available history yields present-but-all-null SMA_/EMA_ columns, so a requested period never silently vanishes.

Args: code: Stock code. start_date: 'YYYY-MM-DD'. end_date: 'YYYY-MM-DD'. periods: Period list (each must be >= 1), e.g. [5,10,20,50,120,250]. Defaults to common set.

ParametersJSON Schema
NameRequiredDescriptionDefault
codeYes
start_dateYes
end_dateYes
periodsNo

TDQS

A4.2/5.0
Behavior4/5

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

With no annotations, the description bears full responsibility for behavioral disclosure. It explains the return structure (one row per trading day), warmup prefetching to avoid nulls within the range, and handling of periods exceeding available history. No mention of permissions, rate limits, or destructive actions, but these are less critical for a read-only calculation tool.

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 description is well-structured with a clear initial statement, followed by details on behavior and edge cases, and a parameter list. It is slightly verbose but each sentence adds value without redundancy.

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 absence of an output schema and the moderate complexity (4 parameters), the description covers return behavior, row structure, and parameter details comprehensively. It does not specify the exact column naming convention but sufficiently informs about output.

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?

The input schema has 0% description coverage, but the description adds meaning for all parameters: code is a stock code, start_date and end_date are in YYYY-MM-DD format, and periods is a list of integers ≥1 with a default common set. This fully compensates for the schema's lack of descriptions.

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 that the tool calculates SMA and EMA for multiple periods over a date range. This is a specific verb and resource, and it distinguishes itself from sibling tools that address other financial calculations or technical indicators.

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?

The description does not explicitly state when to use this tool versus alternatives, such as get_technical_indicators which might also cover moving averages. Usage is implied through the tool name and context, but no direct guidance or exclusions are provided.

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

get_net_debtA

Compute net debt from the latest balance sheet (conservative upper bound).

net_debt = SHORT_LOAN + LONG_LOAN + BOND_PAYABLE + NONCURRENT_LIAB_1YEAR - MONETARYFUNDS

NONCURRENT_LIAB_1YEAR is a CN-GAAP aggregate bucket containing both long-term-debt current portion (interest-bearing) and lease-liability / long-payable current portions (not interest-bearing); the breakdown is not exposed by EastMoney. For lease-heavy or zero-leverage firms the returned net_debt is overstated by the non-interest portion of this bucket.

Data source: EastMoney via akshare. Returns net_debt value, component breakdown, and the report date of the balance sheet used.

Args: code: Stock code in baostock format, e.g. 'sh.600519'.

ParametersJSON Schema
NameRequiredDescriptionDefault
codeYes

TDQS

A4.5/5.0
Behavior5/5

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

With no annotations, the description fully discloses behavior: the conservative estimate, the formula, a known overstatement issue, data source (EastMoney via akshare), and return contents.

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?

Well-structured with purpose, formula, caveat, and args. However, the caveat paragraph could be slightly condensed without losing clarity.

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

Completeness5/5

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

Despite no output schema, the description explains what is returned (net_debt value, component breakdown, report date). The caveat and data source are appropriately detailed for a single-parameter tool.

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?

The only parameter 'code' is documented with format ('baostock format') and an example ('sh.600519'), adding value beyond the bare schema. Return fields are also described.

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 'compute[s] net debt from the latest balance sheet' with a specific formula. It distinguishes from siblings like get_balance_data by focusing on a derived metric.

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?

No explicit when-to-use or when-not-to-use guidance is given. The caveat about lease-heavy firms implies a limitation, but alternative tools or contexts are not mentioned.

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

get_performance_reportA

Fetch performance express (业绩快报) or forecast (业绩预告) reports.

kind:

  • 'express': performance express reports — absolute performanceExpressTotalAsset / NetAsset / EPSDiluted / ROEWa / GRYOY for companies that file them ahead of the full report.

  • 'forecast': performance forecast reports — profitForcastChgPctUp / profitForcastChgPctDwn and the forecast type.

Args: code: Stock code. kind: 'express' for filed express reports, 'forecast' for guidance. start_date: 'YYYY-MM-DD'. end_date: 'YYYY-MM-DD'.

ParametersJSON Schema
NameRequiredDescriptionDefault
codeYes
kindYes
start_dateYes
end_dateYes

TDQS

A3.6/5.0
Behavior3/5

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

No annotations are provided, so the description carries full burden. It discloses output fields for each kind but does not discuss limitations, data latency, authentication needs, or whether results are a list or single object. It is partially transparent.

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 description is structured with clear sections: a one-sentence purpose, then details for each kind, then args. While fairly detailed, it remains focused and includes only necessary information.

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?

With no output schema, the description partially explains return fields but does not specify the overall return format (e.g., list of records, single record). It omits details like whether multiple reports can be returned per date range or the structure of the response.

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?

With 0% schema description coverage, the description compensates well by explaining each parameter: code, kind (with enum meanings and associated fields), and date formats (YYYY-MM-DD). This adds significant value beyond 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?

The description clearly states it fetches performance express or forecast reports for a stock, explaining the difference between the two kinds with specific data fields. This distinguishes it from sibling tools like get_financial_indicators or get_financial_statement.

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?

The description does not explicitly state when to use this tool versus alternatives, nor does it provide context about when not to use it. It only describes the tool's function without guidance on selection among siblings.

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

get_required_reserve_ratio_dataB

Fetch required reserve ratio data.

Args: start_date: Optional 'YYYY-MM-DD'. end_date: Optional 'YYYY-MM-DD'. year_type: '0' announcement date (default), '1' effective date.

ParametersJSON Schema
NameRequiredDescriptionDefault
start_dateNo
end_dateNo
year_typeNo0

TDQS

B3.1/5.0
Behavior2/5

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

No annotations are provided, so the description carries full burden. It does not disclose any behavioral traits such as side effects, authentication requirements, rate limits, or return format. It only states the basic fetch operation.

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 description is concise and uses a docstring format with parameter details. It is well-structured and front-loaded with the core purpose. No wasted words.

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?

While parameter semantics are covered, the description is incomplete for a tool with 3 optional parameters, no output schema, and no annotations. It lacks information about return values, error handling, and use cases, which would improve completeness.

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 description coverage is 0%, but the description adds meaning by specifying date format ('YYYY-MM-DD') and explaining the year_type parameter ('0' announcement date, '1' effective date). This compensates well for the lack of schema descriptions.

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?

Clear verb+resource: 'Fetch required reserve ratio data.' It specifies the data type and distinguishes from many other data-fetching tools in the sibling list, though it could be more specific about the source.

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?

No explicit guidance on when to use this tool versus alternatives. There is no mention of when-not or preferred contexts. The sibling list includes many similar data tools, but the description offers no differentiation.

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

get_stock_basic_infoB

Fetch basic info: code, code_name, ipoDate, outDate, type, status.

Args: code: Stock code, e.g. 'sh.600519'.

ParametersJSON Schema
NameRequiredDescriptionDefault
codeYes

TDQS

B3.3/5.0
Behavior2/5

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

No annotations are provided, so the description carries full burden. It does not disclose behavioral traits such as read-only nature, authentication requirements, rate limits, or potential side effects. The description only lists output fields without behavioral context.

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 very concise: one line for the purpose and one line for the parameter with example. Every sentence is necessary and adds value. No wasted words.

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 simple tool with one parameter and no output schema, the description adequately covers the purpose and expected input, and lists the returned fields. It could mention whether the output is a single object or list, but overall it is sufficient.

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?

The single parameter 'code' has no schema description (0% coverage). The description adds an example format ('e.g. 'sh.600519''), which provides meaningful context beyond the schema. This clarifies the expected input format clearly.

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 clearly states the action ('Fetch') and resource ('basic info') and lists the specific fields returned (code, code_name, ipoDate, outDate, type, status). It is distinct from sibling tools that provide other types of stock data, but could be improved by explicitly differentiating from similar tools like get_stock_snapshot.

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?

No guidance is provided on when to use this tool versus alternatives, such as get_stock_snapshot or get_stock_industry. There is no mention of prerequisites, limitations, or scenarios where the tool should not be used.

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

get_stock_industryA

Fetch industry classification data.

Args: code: Stock code, e.g. 'sh.600519'. date: Optional date 'YYYY-MM-DD'. Defaults to latest.

ParametersJSON Schema
NameRequiredDescriptionDefault
codeYes
dateNo

TDQS

A3.5/5.0
Behavior2/5

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

No annotations are present, and the description does not disclose any behavioral traits such as read-only status, authentication requirements, or potential side effects. The description is purely functional.

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 extremely concise, with a single sentence and a clear argument list. No wasted words.

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?

Given the low complexity and absence of output schema, the description is adequate but does not explain the return format or data structure. It meets minimum viability.

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?

The description adds meaningful detail beyond the schema property names, including an example for 'code' and format for 'date'. With 0% schema coverage, the description compensates adequately.

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 it fetches industry classification data for a stock code, optionally on a date. The verb 'fetch' and resource 'industry classification data' are specific and unambiguous.

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?

No guidance is provided on when to use this tool versus alternatives. There is no mention of context, prerequisites, or exclusions.

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

get_stock_snapshotA

One-call snapshot: latest price, valuation, industry, total shares, net profit.

Combines data from K-line, stock_industry, and profit_data.

Designed for individual stocks. An index (sh.000300, etc.) has K-line + valuation but no industry / basic / profit rows; those fields come back null instead of aborting the call, so price + PE/PB/PS are still returned.

Profit fields (net_profit, revenue) come from the most recently published report, so they may be Q1, H1, 9M, or FY depending on the calendar. Always inspect profit_period_type ('Q1'/'H1'/'9M'/'FY') and profit_period_months (3/6/9/12) before comparing across companies: baostock reports these cumulative-from-year-start, so Q1's net_profit is 3 months, NOT comparable to FY's 12. To annualize, multiply Q1 by 4, H1 by 2.

baostock fills MBRevenue only on H1 / FY reports, so revenue is null when profit_period_type is 'Q1' or '9M'.

Args: code: Stock code.

ParametersJSON Schema
NameRequiredDescriptionDefault
codeYes

TDQS

A4.4/5.0
Behavior5/5

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

With no annotations provided, the description fully carries the burden. It details data source combination, fallback behavior for indices, and critical nuances about profit period types, cumulative reporting, and revenue null cases.

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?

Well-structured with front-loaded purpose, data sources, special behavior, and detailed caveats. Every sentence adds value, but the length might be slightly dense; a bit more conciseness could be achieved.

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

Completeness5/5

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

Given one parameter, no output schema, and no annotations, the description provides comprehensive context: input, data sources, behavior for different inputs, meaning of output fields, and important usage caveats.

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 0%, and the description adds a minimal arg description 'Stock code.' This is adequate but not exceptional; the description compensates slightly but could add more detail (e.g., format examples).

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 it's a 'one-call snapshot' combining data from multiple sources, listing the specific fields. It distinguishes itself from siblings by being a composite tool, and the name reinforces its purpose.

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?

Explicitly says designed for individual stocks, explains behavior for indices (null fields but still returns). Implicitly suggests when to use instead of multiple individual calls, but lacks explicit when-not or alternatives compared to siblings.

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

get_technical_indicatorsA

Calculate technical indicators for a stock.

Trend/momentum indicators use forward-adjusted prices. Volume indicators (OBV, MFI) transparently fetch a second pass with raw bars because baostock does not split-adjust volume — mixing forward-adjusted price with raw volume would distort money-flow on split / bonus-issue days. Volume indicators thus cost one extra network round-trip when requested.

Returns one row per trading day in [start_date, end_date]. Warmup is auto-prefetched, so values inside the range are not null from warmup.

Args: code: Stock code. start_date: 'YYYY-MM-DD'. end_date: 'YYYY-MM-DD'. indicators: List from ['MACD','RSI','KDJ','BOLL','WR','STOCH','CCI','ATR','ADX','OBV','MFI']. Defaults to all.

ParametersJSON Schema
NameRequiredDescriptionDefault
codeYes
start_dateYes
end_dateYes
indicatorsNo

TDQS

A4.6/5.0
Behavior5/5

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

With no annotations, the description fully discloses behavior: volume indicators cause an extra network round-trip due to baostock limitations, and warmup is auto-prefetched to avoid nulls. This is rich detail beyond what annotations would typically provide.

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 description is front-loaded with the primary purpose. While it includes technical details about volume indicators, these are valuable for transparency. The structure is logical but slightly verbose; a slightly more concise version could exist without losing information.

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?

The description explains return format (one row per day) and warmup behavior. However, it does not explicitly state the columns in the output (e.g., date, indicator values), which is a minor gap given no output schema. Overall, it is fairly complete for the complexity.

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 description coverage is 0%, so the description carries full burden. It documents all four parameters: code, start_date (date format), end_date, and indicators (list of valid strings with default). This adds necessary meaning beyond the raw 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?

The description clearly states 'Calculate technical indicators for a stock' with a specific verb and resource. It distinguishes itself from sibling tools like get_moving_averages by explaining the types of indicators and the data handling for volume indicators.

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 mentions the extra cost for volume indicators and the auto-prefetched warmup, providing context. However, it does not explicitly state when not to use this tool or recommend alternative tools (e.g., get_moving_averages for simple moving averages).

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

get_trade_datesA

Fetch trading calendar. Each row has calendar_date and is_trading_day ('1'/'0').

Args: start_date: Optional 'YYYY-MM-DD'. end_date: Optional 'YYYY-MM-DD'.

ParametersJSON Schema
NameRequiredDescriptionDefault
start_dateNo
end_dateNo

TDQS

A4.2/5.0
Behavior4/5

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

No annotations provided, so description carries full burden. It accurately describes the output format and that the tool is a fetch (read) operation. While it does not explicitly state non-destructiveness, the name and description make it clear. Could mention rate limits or authentication but not necessary for this simple tool.

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?

Extremely concise: one sentence for purpose, then a brief args section. No unnecessary words. Front-loaded with key information. Every sentence earns its place.

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 no output schema, description explains return rows. It does not cover edge cases (e.g., invalid dates), but for a simple calendar tool with two optional parameters, it is sufficiently complete. Could mention what happens if no dates provided, but implied by 'optional'.

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 0% (schema descriptions are empty), but the tool description adds parameter semantics: 'start_date: Optional YYYY-MM-DD' and similarly for end_date. This provides format and optionality beyond the bare schema. Adds meaningful context.

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?

Description clearly states 'Fetch trading calendar' with specific output columns (calendar_date, is_trading_day). Distinguishes from sibling tools like get_latest_trading_date by indicating it returns a range. Purpose is unambiguous.

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?

Description implies usage for obtaining a trading calendar within a date range, but does not explicitly state when to use this tool versus alternatives like get_latest_trading_date. No exclusions or prerequisites are mentioned. Only implied context.

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

get_valuation_metricsA

Fetch valuation metrics (PE/PB/PS/PCF) history and current snapshot.

Each metric in metrics independently reports current and as_of (the date of its last valid observation), since close and PE/PB/PS can be missing on different days. period.last_trading_date reports the last K-line bar in the window, separate from any metric's as_of.

Each non-close metric also reports positive_mean/positive_median/ positive_min/positive_max plus percentile_pct (0-100 rank of current: a fresh low ~0.4, an all-time high ~100), computed over POSITIVE values only. sample_size is the positive-observation count; percentile_pct is null when current is non-positive.

Args: code: Stock code. start_date: Optional, defaults to 1 year ago. end_date: Optional, defaults to today.

ParametersJSON Schema
NameRequiredDescriptionDefault
codeYes
start_dateNo
end_dateNo

TDQS

A4.1/5.0
Behavior5/5

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

With no annotations, the description fully discloses behavioral traits: independent metric reporting, as_of dates, percentile computation over positive values, null handling for non-positive current, and period.last_trading_date separate from metric as_of. This is highly transparent.

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 description is front-loaded with the core purpose and then details behavioral nuances. While somewhat verbose, each sentence adds necessary context, making it appropriately sized.

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

Completeness5/5

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

Despite no output schema, the description thoroughly explains return values (current, as_of, percentile_pct, sample_size, period.last_trading_date) and parameter defaults. It covers all edge cases and behavioral details, making it fully complete for an agent to invoke correctly.

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 0%, but the description adds an 'Args' section explaining each parameter (code as stock code, start_date defaulting to 1 year ago, end_date defaulting to today). This adds meaningful context beyond the schema titles.

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 clearly states it fetches valuation metrics history and current snapshot (PE/PB/PS/PCF). It uses a specific verb and resource, but does not explicitly differentiate from sibling tools, which are mostly different calculation or data retrieval functions.

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?

The description does not explicitly state when to use this tool versus alternatives. It implies usage by describing the data, but lacks direct guidance on context or exclusions.

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

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

  1. 20 tool updatesv0.1.3
    • Removedget_balance_data
    • Addedget_benchmark_rate_data
    • Removedget_cash_flow_data
    • Removedget_deposit_rate_data
    • Removedget_dupont_data
    • Addedget_financial_indicators
    • Removedget_forecast_report
    • Removedget_growth_data
    • Removedget_hs300_stocks
    • Addedget_index_constituents
    • Removedget_loan_rate_data
    • Addedget_money_supply_data
    • Removedget_money_supply_data_month
    • Removedget_money_supply_data_year
    • Removedget_operation_data
    • Removedget_performance_express_report
    • Addedget_performance_report
    • Removedget_profit_data
    • Removedget_sz50_stocks
    • Removedget_zz500_stocks
  2. 2 tool updatesv0.1.1
    • Addedget_financial_statement
    • Addedget_net_debt
  3. 33 tool updatesv0.1.0
    • Changedcalculate_dcf_valuation1 field changed
      • changedOutput schema / (root)
        Previous value: -{
        -  "additionalProperties": true,
        -  "title": "calculate_dcf_valuationDictOutput",
        -  "type": "object"
        -}New value: +null
    • Changedcalculate_ddm_valuation1 field changed
      • changedOutput schema / (root)
        Previous value: -{
        -  "additionalProperties": true,
        -  "title": "calculate_ddm_valuationDictOutput",
        -  "type": "object"
        -}New value: +null
    • Changedcalculate_peg_ratio4 fields changed
      • removedInput schema / properties / quarter
        Removed value: -{
        -  "title": "Quarter",
        -  "type": "integer"
        -}
      • removedInput schema / properties / year
        Removed value: -{
        -  "title": "Year",
        -  "type": "string"
        -}
      • changedInput schema / required
        Previous value: -[
        -  "code",
        -  "year",
        -  "quarter"
        -]New value: +[
        +  "code"
        +]
      • changedOutput schema / (root)
        Previous value: -{
        -  "additionalProperties": true,
        -  "title": "calculate_peg_ratioDictOutput",
        -  "type": "object"
        -}New value: +null
    • Changedcalculate_risk_metrics1 field changed
      • changedOutput schema / (root)
        Previous value: -{
        -  "additionalProperties": true,
        -  "title": "calculate_risk_metricsDictOutput",
        -  "type": "object"
        -}New value: +null
    • Changedcompare_industry_valuation1 field changed
      • changedOutput schema / (root)
        Previous value: -{
        -  "additionalProperties": true,
        -  "title": "compare_industry_valuationDictOutput",
        -  "type": "object"
        -}New value: +null
    • Changedget_adjust_factor_data1 field changed
      • changedOutput schema / (root)
        Previous value: -{
        -  "$defs": {
        -    "Record": {
        -      "additionalProperties": true,
        -      "type": "object"
        -    }
        -  },
        -  "properties": {
        -    "result": {
        -      "items": {
        -        "$ref": "#/$defs/Record"
        -      },
        -      "title": "Result",
        -      "type": "array"
        -    }
        -  },
        -  "required": [
        -    "result"
        -  ],
        -  "title": "get_adjust_factor_dataOutput",
        -  "type": "object"
        -}New value: +null
    • Changedget_all_stock3 fields changed
      • addedInput schema / properties / query
        Added value: +{
        +  "title": "Query",
        +  "type": "string"
        +}
      • addedInput schema / required
        Added value: +[
        +  "query"
        +]
      • changedOutput schema / (root)
        Previous value: -{
        -  "$defs": {
        -    "Record": {
        -      "additionalProperties": true,
        -      "type": "object"
        -    }
        -  },
        -  "properties": {
        -    "result": {
        -      "items": {
        -        "$ref": "#/$defs/Record"
        -      },
        -      "title": "Result",
        -      "type": "array"
        -    }
        -  },
        -  "required": [
        -    "result"
        -  ],
        -  "title": "get_all_stockOutput",
        -  "type": "object"
        -}New value: +null
    • Changedget_balance_data1 field changed
      • changedOutput schema / (root)
        Previous value: -{
        -  "$defs": {
        -    "Record": {
        -      "additionalProperties": true,
        -      "type": "object"
        -    }
        -  },
        -  "properties": {
        -    "result": {
        -      "items": {
        -        "$ref": "#/$defs/Record"
        -      },
        -      "title": "Result",
        -      "type": "array"
        -    }
        -  },
        -  "required": [
        -    "result"
        -  ],
        -  "title": "get_balance_dataOutput",
        -  "type": "object"
        -}New value: +null
    • Changedget_cash_flow_data1 field changed
      • changedOutput schema / (root)
        Previous value: -{
        -  "$defs": {
        -    "Record": {
        -      "additionalProperties": true,
        -      "type": "object"
        -    }
        -  },
        -  "properties": {
        -    "result": {
        -      "items": {
        -        "$ref": "#/$defs/Record"
        -      },
        -      "title": "Result",
        -      "type": "array"
        -    }
        -  },
        -  "required": [
        -    "result"
        -  ],
        -  "title": "get_cash_flow_dataOutput",
        -  "type": "object"
        -}New value: +null
    • Changedget_deposit_rate_data1 field changed
      • changedOutput schema / (root)
        Previous value: -{
        -  "$defs": {
        -    "Record": {
        -      "additionalProperties": true,
        -      "type": "object"
        -    }
        -  },
        -  "properties": {
        -    "result": {
        -      "items": {
        -        "$ref": "#/$defs/Record"
        -      },
        -      "title": "Result",
        -      "type": "array"
        -    }
        -  },
        -  "required": [
        -    "result"
        -  ],
        -  "title": "get_deposit_rate_dataOutput",
        -  "type": "object"
        -}New value: +null
    • Changedget_dividend_data1 field changed
      • changedOutput schema / (root)
        Previous value: -{
        -  "$defs": {
        -    "Record": {
        -      "additionalProperties": true,
        -      "type": "object"
        -    }
        -  },
        -  "properties": {
        -    "result": {
        -      "items": {
        -        "$ref": "#/$defs/Record"
        -      },
        -      "title": "Result",
        -      "type": "array"
        -    }
        -  },
        -  "required": [
        -    "result"
        -  ],
        -  "title": "get_dividend_dataOutput",
        -  "type": "object"
        -}New value: +null
    • Changedget_dupont_data1 field changed
      • changedOutput schema / (root)
        Previous value: -{
        -  "$defs": {
        -    "Record": {
        -      "additionalProperties": true,
        -      "type": "object"
        -    }
        -  },
        -  "properties": {
        -    "result": {
        -      "items": {
        -        "$ref": "#/$defs/Record"
        -      },
        -      "title": "Result",
        -      "type": "array"
        -    }
        -  },
        -  "required": [
        -    "result"
        -  ],
        -  "title": "get_dupont_dataOutput",
        -  "type": "object"
        -}New value: +null
    • Changedget_forecast_report1 field changed
      • changedOutput schema / (root)
        Previous value: -{
        -  "$defs": {
        -    "Record": {
        -      "additionalProperties": true,
        -      "type": "object"
        -    }
        -  },
        -  "properties": {
        -    "result": {
        -      "items": {
        -        "$ref": "#/$defs/Record"
        -      },
        -      "title": "Result",
        -      "type": "array"
        -    }
        -  },
        -  "required": [
        -    "result"
        -  ],
        -  "title": "get_forecast_reportOutput",
        -  "type": "object"
        -}New value: +null
    • Changedget_growth_data1 field changed
      • changedOutput schema / (root)
        Previous value: -{
        -  "$defs": {
        -    "Record": {
        -      "additionalProperties": true,
        -      "type": "object"
        -    }
        -  },
        -  "properties": {
        -    "result": {
        -      "items": {
        -        "$ref": "#/$defs/Record"
        -      },
        -      "title": "Result",
        -      "type": "array"
        -    }
        -  },
        -  "required": [
        -    "result"
        -  ],
        -  "title": "get_growth_dataOutput",
        -  "type": "object"
        -}New value: +null
    • Changedget_historical_k_data1 field changed
      • changedOutput schema / (root)
        Previous value: -{
        -  "$defs": {
        -    "Record": {
        -      "additionalProperties": true,
        -      "type": "object"
        -    }
        -  },
        -  "properties": {
        -    "result": {
        -      "items": {
        -        "$ref": "#/$defs/Record"
        -      },
        -      "title": "Result",
        -      "type": "array"
        -    }
        -  },
        -  "required": [
        -    "result"
        -  ],
        -  "title": "get_historical_k_dataOutput",
        -  "type": "object"
        -}New value: +null
    • Changedget_hs300_stocks1 field changed
      • changedOutput schema / (root)
        Previous value: -{
        -  "$defs": {
        -    "Record": {
        -      "additionalProperties": true,
        -      "type": "object"
        -    }
        -  },
        -  "properties": {
        -    "result": {
        -      "items": {
        -        "$ref": "#/$defs/Record"
        -      },
        -      "title": "Result",
        -      "type": "array"
        -    }
        -  },
        -  "required": [
        -    "result"
        -  ],
        -  "title": "get_hs300_stocksOutput",
        -  "type": "object"
        -}New value: +null
    • Changedget_latest_trading_date1 field changed
      • changedOutput schema / (root)
        Previous value: -{
        -  "properties": {
        -    "result": {
        -      "title": "Result",
        -      "type": "string"
        -    }
        -  },
        -  "required": [
        -    "result"
        -  ],
        -  "title": "get_latest_trading_dateOutput",
        -  "type": "object"
        -}New value: +null
    • Changedget_loan_rate_data1 field changed
      • changedOutput schema / (root)
        Previous value: -{
        -  "$defs": {
        -    "Record": {
        -      "additionalProperties": true,
        -      "type": "object"
        -    }
        -  },
        -  "properties": {
        -    "result": {
        -      "items": {
        -        "$ref": "#/$defs/Record"
        -      },
        -      "title": "Result",
        -      "type": "array"
        -    }
        -  },
        -  "required": [
        -    "result"
        -  ],
        -  "title": "get_loan_rate_dataOutput",
        -  "type": "object"
        -}New value: +null
    • Changedget_money_supply_data_month1 field changed
      • changedOutput schema / (root)
        Previous value: -{
        -  "$defs": {
        -    "Record": {
        -      "additionalProperties": true,
        -      "type": "object"
        -    }
        -  },
        -  "properties": {
        -    "result": {
        -      "items": {
        -        "$ref": "#/$defs/Record"
        -      },
        -      "title": "Result",
        -      "type": "array"
        -    }
        -  },
        -  "required": [
        -    "result"
        -  ],
        -  "title": "get_money_supply_data_monthOutput",
        -  "type": "object"
        -}New value: +null
    • Changedget_money_supply_data_year1 field changed
      • changedOutput schema / (root)
        Previous value: -{
        -  "$defs": {
        -    "Record": {
        -      "additionalProperties": true,
        -      "type": "object"
        -    }
        -  },
        -  "properties": {
        -    "result": {
        -      "items": {
        -        "$ref": "#/$defs/Record"
        -      },
        -      "title": "Result",
        -      "type": "array"
        -    }
        -  },
        -  "required": [
        -    "result"
        -  ],
        -  "title": "get_money_supply_data_yearOutput",
        -  "type": "object"
        -}New value: +null
    • Changedget_moving_averages1 field changed
      • changedOutput schema / (root)
        Previous value: -{
        -  "properties": {
        -    "result": {
        -      "items": {
        -        "additionalProperties": true,
        -        "type": "object"
        -      },
        -      "title": "Result",
        -      "type": "array"
        -    }
        -  },
        -  "required": [
        -    "result"
        -  ],
        -  "title": "get_moving_averagesOutput",
        -  "type": "object"
        -}New value: +null
    • Changedget_operation_data1 field changed
      • changedOutput schema / (root)
        Previous value: -{
        -  "$defs": {
        -    "Record": {
        -      "additionalProperties": true,
        -      "type": "object"
        -    }
        -  },
        -  "properties": {
        -    "result": {
        -      "items": {
        -        "$ref": "#/$defs/Record"
        -      },
        -      "title": "Result",
        -      "type": "array"
        -    }
        -  },
        -  "required": [
        -    "result"
        -  ],
        -  "title": "get_operation_dataOutput",
        -  "type": "object"
        -}New value: +null
    • Changedget_performance_express_report1 field changed
      • changedOutput schema / (root)
        Previous value: -{
        -  "$defs": {
        -    "Record": {
        -      "additionalProperties": true,
        -      "type": "object"
        -    }
        -  },
        -  "properties": {
        -    "result": {
        -      "items": {
        -        "$ref": "#/$defs/Record"
        -      },
        -      "title": "Result",
        -      "type": "array"
        -    }
        -  },
        -  "required": [
        -    "result"
        -  ],
        -  "title": "get_performance_express_reportOutput",
        -  "type": "object"
        -}New value: +null
    • Changedget_profit_data1 field changed
      • changedOutput schema / (root)
        Previous value: -{
        -  "$defs": {
        -    "Record": {
        -      "additionalProperties": true,
        -      "type": "object"
        -    }
        -  },
        -  "properties": {
        -    "result": {
        -      "items": {
        -        "$ref": "#/$defs/Record"
        -      },
        -      "title": "Result",
        -      "type": "array"
        -    }
        -  },
        -  "required": [
        -    "result"
        -  ],
        -  "title": "get_profit_dataOutput",
        -  "type": "object"
        -}New value: +null
    • Changedget_required_reserve_ratio_data1 field changed
      • changedOutput schema / (root)
        Previous value: -{
        -  "$defs": {
        -    "Record": {
        -      "additionalProperties": true,
        -      "type": "object"
        -    }
        -  },
        -  "properties": {
        -    "result": {
        -      "items": {
        -        "$ref": "#/$defs/Record"
        -      },
        -      "title": "Result",
        -      "type": "array"
        -    }
        -  },
        -  "required": [
        -    "result"
        -  ],
        -  "title": "get_required_reserve_ratio_dataOutput",
        -  "type": "object"
        -}New value: +null
    • Changedget_stock_basic_info1 field changed
      • changedOutput schema / (root)
        Previous value: -{
        -  "$defs": {
        -    "Record": {
        -      "additionalProperties": true,
        -      "type": "object"
        -    }
        -  },
        -  "properties": {
        -    "result": {
        -      "$ref": "#/$defs/Record"
        -    }
        -  },
        -  "required": [
        -    "result"
        -  ],
        -  "title": "get_stock_basic_infoOutput",
        -  "type": "object"
        -}New value: +null
    • Changedget_stock_industry5 fields changed
      • removedInput schema / properties / code / anyOf
        Removed value: -[
        -  {
        -    "type": "string"
        -  },
        -  {
        -    "type": "null"
        -  }
        -]
      • removedInput schema / properties / code / default
        Removed value: -null
      • addedInput schema / properties / code / type
        Added value: +"string"
      • addedInput schema / required
        Added value: +[
        +  "code"
        +]
      • changedOutput schema / (root)
        Previous value: -{
        -  "$defs": {
        -    "Record": {
        -      "additionalProperties": true,
        -      "type": "object"
        -    }
        -  },
        -  "properties": {
        -    "result": {
        -      "items": {
        -        "$ref": "#/$defs/Record"
        -      },
        -      "title": "Result",
        -      "type": "array"
        -    }
        -  },
        -  "required": [
        -    "result"
        -  ],
        -  "title": "get_stock_industryOutput",
        -  "type": "object"
        -}New value: +null
    • Changedget_stock_snapshot1 field changed
      • changedOutput schema / (root)
        Previous value: -{
        -  "additionalProperties": true,
        -  "title": "get_stock_snapshotDictOutput",
        -  "type": "object"
        -}New value: +null
    • Changedget_sz50_stocks1 field changed
      • changedOutput schema / (root)
        Previous value: -{
        -  "$defs": {
        -    "Record": {
        -      "additionalProperties": true,
        -      "type": "object"
        -    }
        -  },
        -  "properties": {
        -    "result": {
        -      "items": {
        -        "$ref": "#/$defs/Record"
        -      },
        -      "title": "Result",
        -      "type": "array"
        -    }
        -  },
        -  "required": [
        -    "result"
        -  ],
        -  "title": "get_sz50_stocksOutput",
        -  "type": "object"
        -}New value: +null
    • Changedget_technical_indicators1 field changed
      • changedOutput schema / (root)
        Previous value: -{
        -  "properties": {
        -    "result": {
        -      "items": {
        -        "additionalProperties": true,
        -        "type": "object"
        -      },
        -      "title": "Result",
        -      "type": "array"
        -    }
        -  },
        -  "required": [
        -    "result"
        -  ],
        -  "title": "get_technical_indicatorsOutput",
        -  "type": "object"
        -}New value: +null
    • Changedget_trade_dates1 field changed
      • changedOutput schema / (root)
        Previous value: -{
        -  "$defs": {
        -    "Record": {
        -      "additionalProperties": true,
        -      "type": "object"
        -    }
        -  },
        -  "properties": {
        -    "result": {
        -      "items": {
        -        "$ref": "#/$defs/Record"
        -      },
        -      "title": "Result",
        -      "type": "array"
        -    }
        -  },
        -  "required": [
        -    "result"
        -  ],
        -  "title": "get_trade_datesOutput",
        -  "type": "object"
        -}New value: +null
    • Changedget_valuation_metrics1 field changed
      • changedOutput schema / (root)
        Previous value: -{
        -  "additionalProperties": true,
        -  "title": "get_valuation_metricsDictOutput",
        -  "type": "object"
        -}New value: +null
    • Changedget_zz500_stocks1 field changed
      • changedOutput schema / (root)
        Previous value: -{
        -  "$defs": {
        -    "Record": {
        -      "additionalProperties": true,
        -      "type": "object"
        -    }
        -  },
        -  "properties": {
        -    "result": {
        -      "items": {
        -        "$ref": "#/$defs/Record"
        -      },
        -      "title": "Result",
        -      "type": "array"
        -    }
        -  },
        -  "required": [
        -    "result"
        -  ],
        -  "title": "get_zz500_stocksOutput",
        -  "type": "object"
        -}New value: +null
  4. 33 tool updatesv0.0.1
    • First observedcalculate_dcf_valuation
    • First observedcalculate_ddm_valuation
    • First observedcalculate_peg_ratio
    • First observedcalculate_risk_metrics
    • First observedcompare_industry_valuation
    • First observedget_adjust_factor_data
    • First observedget_all_stock
    • First observedget_balance_data
    • First observedget_cash_flow_data
    • First observedget_deposit_rate_data
    • First observedget_dividend_data
    • First observedget_dupont_data
    • First observedget_forecast_report
    • First observedget_growth_data
    • First observedget_historical_k_data
    • First observedget_hs300_stocks
    • First observedget_latest_trading_date
    • First observedget_loan_rate_data
    • First observedget_money_supply_data_month
    • First observedget_money_supply_data_year
    • First observedget_moving_averages
    • First observedget_operation_data
    • First observedget_performance_express_report
    • First observedget_profit_data
    • First observedget_required_reserve_ratio_data
    • First observedget_stock_basic_info
    • First observedget_stock_industry
    • First observedget_stock_snapshot
    • First observedget_sz50_stocks
    • First observedget_technical_indicators
    • First observedget_trade_dates
    • First observedget_valuation_metrics
    • First observedget_zz500_stocks

TDQS

A3.9/5.0

Scored across 25 tools

Disambiguation4/5

Most tools have clearly distinct purposes, with only minor potential overlap between get_financial_indicators and get_financial_statement. Descriptions are detailed enough to differentiate them, and no two tools appear to do the same thing.

Naming Consistency5/5

All tool names follow a consistent verb_noun pattern using snake_case, either get_* or calculate_*. There is no mixing of conventions or camelCase, making the naming predictable and clear.

Tool Count4/5

25 tools is on the high side but still reasonable for a comprehensive Chinese A-share analysis server. The breadth of coverage (fundamentals, technicals, macro) justifies the count, though a slight reduction could improve focus.

Completeness4/5

The tool set covers a wide range of essential functionalities for stock analysis, including valuation, financials, technicals, and macro data. Minor gaps exist (e.g., options, sentiment), but the core workflows are well-supported.

Maintenance

ActivityInactive
ResponsivenessNo issues

Related MCP Connectors

Related MCP Servers

  • A
    license
    B
    quality
    D
    maintenance
    Professional financial data MCP server integrating Tushare API, providing real-time financial data and technical indicators analysis for stocks, indices, funds, bonds, and cryptocurrencies across multiple markets (A-share, US, HK, crypto).
    18
    131 npm
    MIT
  • F
    license
    B
    quality
    D
    maintenance
    An MCP server that exposes all 23 baostock data endpoints as tools, including K-line, quarterly financials, performance reports, dividends, industry classification, index constituents, and macro series.
    24
    3
    -
  • F
    license
    Not graded
    quality
    D
    maintenance
    MCP server that wraps SFC financial data API into 32 tools for comprehensive A-share market data, including real-time quotes, rankings, limit-up statistics, news, themes, financials, charts, research reports, and watchlists.
    -
  • A
    license
    Not graded
    quality
    F
    maintenance
    Production-grade MCP server for Chinese A-share market data, offering 30 tools including real-time quotes, K-lines, fund flows, and financial reports, with stdio and HTTP transport support.
    7
    MIT