Skip to main content
Glama
24mlight

A-Share MCP Server

get_operation_data

Retrieve quarterly operation capability data for A-share stocks to analyze company performance and financial health.

Instructions

Quarterly operation capability data.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
codeYes
yearYes
quarterYes
limitNo
formatNomarkdown

Implementation Reference

  • MCP tool handler for get_operation_data. The @app.tool() decorator registers the tool with FastMCP. Includes input schema via type hints and docstring description. Delegates to use case with error handling.
    @app.tool()
    def get_operation_data(code: str, year: str, quarter: int, limit: int = 250, format: str = "markdown") -> str:
        """Quarterly operation capability data."""
        return run_tool_with_handling(
            lambda: fetch_operation_data(active_data_source, code=code, year=year, quarter=quarter, limit=limit, format=format),
            context=f"get_operation_data:{code}:{year}Q{quarter}",
        )
  • mcp_server.py:52-52 (registration)
    Top-level registration of financial report tools, including get_operation_data, by calling the register function.
    register_financial_report_tools(app, active_data_source)
  • Use case helper that performs input validation, fetches data from data source, and formats the output table.
    def fetch_operation_data(data_source: FinancialDataSource, *, code: str, year: str, quarter: int, limit: int, format: str) -> str:
        validate_year(year)
        validate_quarter(quarter)
        validate_output_format(format)
        df = data_source.get_operation_data(code=code, year=year, quarter=quarter)
        return _format_financial_df(df, code=code, year=year, quarter=quarter, dataset="Operation Capability", format=format, limit=limit)
  • Baostock data source implementation that queries the Baostock API for operation data using a shared fetch helper.
    def get_operation_data(self, code: str, year: str, quarter: int) -> pd.DataFrame:
        """Fetches quarterly operation capability data using Baostock."""
        return _fetch_financial_data(bs.query_operation_data, "Operation Capability", code, year, quarter)
  • Abstract method definition in the FinancialDataSource interface, defining the expected schema for data source implementations.
    @abstractmethod
    def get_operation_data(self, code: str, year: str, quarter: int) -> 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 carries full burden for behavioral disclosure. The description reveals nothing about the tool's behavior - whether it's a read-only query, what permissions might be required, whether it has rate limits, what format the data returns in, or any other operational characteristics. It's completely silent on behavioral traits.

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?

While technically concise with just 3 words, this is under-specification rather than effective conciseness. The description fails to provide essential information and doesn't follow the principle of front-loading critical details. It's too brief to be helpful for tool selection and invocation.

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?

For a 5-parameter tool with no annotations, no output schema, and 0% schema description coverage, the description is completely inadequate. It provides no meaningful context about what the tool does, how to use it, what the parameters mean, or what to expect in return. The description fails to compensate for the lack of structured documentation.

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?

With 0% schema description coverage and 5 parameters (3 required), the description provides no information about any parameters. It doesn't explain what 'code', 'year', 'quarter', 'limit', or 'format' mean in the context of operation capability data, nor does it provide any guidance on valid values or usage patterns for these parameters.

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 'Quarterly operation capability data' is vague and tautological - it essentially restates the tool name 'get_operation_data' without specifying what action is performed. It doesn't clearly state what the tool does (e.g., retrieves, analyzes, or processes operation data) or distinguish it from sibling tools like get_balance_data or get_profit_data.

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 about when to use this tool versus alternatives. With many sibling tools available for different financial data types (balance, cash flow, profit, etc.), the description offers no context about what 'operation capability data' represents or when it would be the appropriate choice over other data retrieval tools.

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