Skip to main content
Glama
24mlight

A Share MCP

get_zz500_stocks

Retrieve CSI 500 index constituents with date filtering and customizable output formats for A-share market analysis.

Instructions

CSI 500 constituents.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
dateNo
limitNo
formatNomarkdown

Implementation Reference

  • The main handler function for the 'get_zz500_stocks' MCP tool. It is decorated with @app.tool() for registration and delegates execution to the use case layer via run_tool_with_handling.
    @app.tool()
    def get_zz500_stocks(date: Optional[str] = None, limit: int = 250, format: str = "markdown") -> str:
        """CSI 500 constituents."""
        return run_tool_with_handling(
            lambda: fetch_index_constituents(active_data_source, index="zz500", date=date, limit=limit, format=format),
            context="get_zz500_stocks",
        )
  • Use case helper function that fetches ZZ500 stocks by mapping 'zz500' to data_source.get_zz500_stocks(), validates input, and formats the output as markdown table.
    def fetch_index_constituents(data_source: FinancialDataSource, *, index: str, date: Optional[str], limit: int, format: str) -> str:
        validate_output_format(format)
        key = validate_index_key(index, INDEX_MAP)
        if key == "hs300":
            df = data_source.get_hs300_stocks(date=date)
        elif key == "sz50":
            df = data_source.get_sz50_stocks(date=date)
        else:
            df = data_source.get_zz500_stocks(date=date)
        meta = {"index": key, "as_of": date or "latest"}
        return format_table_output(df, format=format, max_rows=limit, meta=meta)
  • Concrete implementation of get_zz500_stocks in BaostockDataSource, invoking the Baostock library's query_zz500_stocks via a shared helper.
    def get_zz500_stocks(self, date: Optional[str] = None) -> pd.DataFrame:
        """Fetches CSI 500 index constituents using Baostock."""
        return _fetch_index_constituent_data(bs.query_zz500_stocks, "CSI 500", date)
  • Interface definition (schema) for the get_zz500_stocks method in FinancialDataSource abstract base class.
    @abstractmethod
    def get_zz500_stocks(self, date: Optional[str] = None) -> pd.DataFrame:
        pass
Behavior1/5

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

No annotations are provided, so the description must fully disclose behavioral traits. It fails to describe what the tool does (e.g., returns a list, fetches data), any side effects, authentication needs, rate limits, or output format. The phrase 'CSI 500 constituents' is insufficient, leaving the agent with no understanding of 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.

Conciseness2/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is overly concise to the point of under-specification. While it uses only three words, it lacks essential details, making it inefficient rather than succinct. It is not front-loaded with critical information, failing to convey the tool's core functionality upfront.

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

Completeness1/5

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

Given the complexity (3 parameters, 0% schema coverage, no annotations, no output schema), the description is severely incomplete. It does not explain what the tool returns, how to use parameters, or behavioral aspects, leaving the agent unable to effectively invoke or understand the tool's role among siblings.

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

Parameters1/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 by explaining parameters. It provides no information about the three parameters (date, limit, format), their purposes, or how they affect the output. For example, it does not clarify if 'date' filters constituents by a specific date or what 'format' options are available.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose2/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description 'CSI 500 constituents' restates the tool name 'get_zz500_stocks' without specifying the action. It identifies the resource (CSI 500 stocks) but lacks a clear verb (e.g., 'retrieve', 'list', 'fetch'), making the purpose vague. Compared to siblings like 'get_hs300_stocks' or 'get_sz50_stocks', it fails to differentiate beyond the index name.

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

Usage Guidelines1/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. It does not mention sibling tools like 'get_hs300_stocks' for different indices or 'get_index_constituents' for general index data, nor does it specify prerequisites or contexts for usage. The description offers no usage instructions.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/24mlight/a_share_mcp_is_just_I_need'

If you have feedback or need assistance with the MCP directory API, please join our Discord server