Skip to main content
Glama
24mlight

A Share MCP

by 24mlight

list_industries

Retrieve distinct industry classifications for A-share stocks on a specified date to analyze market sectors and industry composition.

Instructions

List distinct industries for a given date.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
dateNo
formatNomarkdown

Implementation Reference

  • The main handler function for the 'list_industries' tool. It is decorated with @app.tool() which registers it with the MCP server, logs the call, and executes the core logic via run_tool_with_handling delegating to fetch_list_industries.
    @app.tool()
    def list_industries(date: Optional[str] = None, format: str = "markdown") -> str:
        """List distinct industries for a given date."""
        logger.info("Tool 'list_industries' called date=%s", date or "latest")
        return run_tool_with_handling(
            lambda: fetch_list_industries(active_data_source, date=date, format=format),
            context="list_industries",
        )
  • Helper function containing the core business logic: fetches stock industry data, extracts unique sorted industries, and formats as markdown table.
    def fetch_list_industries(data_source: FinancialDataSource, *, date: Optional[str], format: str) -> str:
        validate_output_format(format)
        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]
        out = df[[col]].drop_duplicates().sort_values(by=col)
        out = out.rename(columns={col: "industry"})
        meta = {"as_of": date or "latest", "count": int(out.shape[0])}
        return format_table_output(out, format=format, max_rows=out.shape[0], meta=meta)
  • mcp_server.py:53-53 (registration)
    Invocation of register_index_tools during server startup, which triggers the registration of the list_industries tool.
    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 full burden. It mentions 'List distinct industries' which implies a read-only operation, but doesn't disclose behavioral traits like whether it returns a list, table, or other format; if results are paginated; what happens with null date; or any rate limits. The description is minimal and lacks critical context for a tool with parameters.

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, efficient sentence that front-loads the core purpose. There is no wasted verbiage or redundancy, making it easy to parse quickly. Every word contributes directly to the tool's intent.

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 no annotations, 0% schema coverage, no output schema, and 2 parameters, the description is incomplete. It lacks details on parameter usage, return format, error conditions, and behavioral context. For a tool that likely returns a list of industries, more guidance is needed to ensure correct invocation.

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 description must compensate. It mentions 'for a given date', which hints at the 'date' parameter's purpose, but doesn't explain the 'format' parameter at all. With 2 parameters and no schema descriptions, the description adds minimal semantic value, failing to clarify what 'date' format is expected or what 'format' controls.

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 ('List distinct industries') and resource ('industries'), with a specific constraint ('for a given date'). It distinguishes from siblings like 'get_industry_members' (which likely lists members of an industry) by focusing on distinct industry names. However, it doesn't explicitly contrast with 'get_stock_industry' (which might get industry for a specific stock), leaving slight ambiguity.

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 doesn't mention sibling tools like 'get_industry_members' or 'get_stock_industry', nor does it specify prerequisites (e.g., whether a date is required for meaningful results). Usage is implied by the date parameter but not explicitly stated.

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