Skip to main content
Glama
24mlight

A Share MCP

get_industry_members

Retrieve all stocks within a specific industry on a given date using A Share MCP server data. This tool helps identify industry constituents for market analysis and portfolio tracking.

Instructions

Get all stocks in a given industry on a date.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
industryYes
dateNo
limitNo
formatNomarkdown

Implementation Reference

  • MCP tool handler for 'get_industry_members'. Registered via @app.tool() decorator. Delegates to use case logic via run_tool_with_handling.
    @app.tool()
    def get_industry_members(industry: str, date: Optional[str] = None, limit: int = 250, format: str = "markdown") -> str:
        """Get all stocks in a given industry on a date."""
        logger.info("Tool 'get_industry_members' called industry=%s, date=%s", industry, date or "latest")
        return run_tool_with_handling(
            lambda: fetch_industry_members(active_data_source, industry=industry, date=date, limit=limit, format=format),
            context=f"get_industry_members:{industry}",
        )
  • Core implementation logic for fetching and formatting industry members from the data source.
    def fetch_industry_members(data_source: FinancialDataSource, *, industry: str, date: Optional[str], limit: int, format: str) -> str:
        validate_output_format(format)
        validate_non_empty_str(industry, "industry")
        df = data_source.get_stock_industry(code=None, date=date)
        if df is None or df.empty:
            return "(No data available to display)"
        col = "industry" if "industry" in df.columns else df.columns[-1]
        filtered = df[df[col] == industry].copy()
        meta = {"industry": industry, "as_of": date or "latest"}
        return format_table_output(filtered, format=format, max_rows=limit, meta=meta)
  • mcp_server.py:53-53 (registration)
    Registers the index tools module, including 'get_industry_members', by calling register_index_tools.
    register_index_tools(app, active_data_source)
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 burden of behavioral disclosure. It states the tool retrieves data ('Get all stocks'), implying a read-only operation, but does not specify whether it requires authentication, has rate limits, returns paginated results, or handles errors. The mention of 'on a date' hints at historical data access, but behavioral details are minimal.

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 a single, clear sentence with no wasted words. It is appropriately sized and front-loaded, directly stating the tool's core functionality without unnecessary elaboration.

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?

Given the complexity (4 parameters, 0% schema coverage, no annotations, no output schema), the description is incomplete. It lacks details on parameter usage, return values, error handling, and behavioral constraints, making it insufficient for an agent to reliably invoke the tool without additional context.

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?

Schema description coverage is 0%, so the schema provides no parameter descriptions. The description mentions 'industry' and 'date' but does not explain their semantics (e.g., format, valid values, or that 'date' is optional with a default). It omits 'limit' and 'format' entirely, failing to compensate for the low schema coverage.

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 tool's purpose: 'Get all stocks in a given industry on a date.' It specifies the verb ('Get'), resource ('stocks'), and key constraints ('in a given industry', 'on a date'). However, it does not explicitly differentiate from sibling tools like 'get_stock_industry' or 'get_index_constituents', which might have overlapping functionality.

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 provides no guidance on when to use this tool versus alternatives. It does not mention sibling tools like 'get_stock_industry' (which might list industries) or 'get_index_constituents' (which might list stocks in an index), leaving the agent to infer usage context without explicit direction.

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