Skip to main content
Glama
lj22503

InvestBrain

tushare_get_index_components

Fetch constituent stocks and their weights for a given index code through Tushare to analyze index composition and portfolio exposure.

Instructions

Get constituent stocks of an index (Tushare API: index_weight).

Args:
    index_code: Index code (e.g., "000300.SH" for CSI 300)

Returns:
    dict: List of constituent stocks with weight

Input Schema

NameRequiredDescriptionDefault
index_codeNo000300.SH

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

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 the full behavioral burden. It mentions the underlying Tushare endpoint and return shape, but it does not disclose permissions/auth needs, rate limits, data freshness/as-of semantics, or error behavior for a data-retrieval 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 front-loaded with the core action and uses an Args/Returns structure without redundant text. Every sentence contributes to understanding the call or return value.

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 one-parameter retrieval tool with no output schema, the description adequately states the input example and the return content: constituent stocks with weights. It could be more complete by documenting that index_code is optional with a default and by stating data freshness or as-of behavior.

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 schema provides no description for index_code, so the description must compensate. It explains that the parameter is an index code and gives a concrete example, "000300.SH" for CSI 300, though it does not clarify the default value or broader accepted formats.

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 gives a specific verb and resource: "Get constituent stocks of an index." It clearly identifies the returned data, but it does not distinguish this tool from the sibling market_get_index_components or explain the Tushare-specific variant.

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?

It does not say when to choose this tool over alternatives such as market_get_index_components, nor does it state any prerequisites or exclusions. Mentioning "Tushare API: index_weight" is an implementation detail, not usage guidance.

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

Deploy Server

Other Tools