Skip to main content
Glama
24mlight

A Share MCP

get_growth_data

Retrieve quarterly growth capability data for A-share stocks by specifying stock code, year, and quarter to analyze financial performance trends.

Instructions

Quarterly growth capability data.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
codeYes
yearYes
quarterYes
limitNo
formatNomarkdown

Implementation Reference

  • MCP tool handler for 'get_growth_data', decorated with @app.tool(). Accepts code, year, quarter, limit, and format parameters. Delegates execution to the fetch_growth_data use case wrapped in run_tool_with_handling for error handling and caching.
    @app.tool() def get_growth_data(code: str, year: str, quarter: int, limit: int = 250, format: str = "markdown") -> str: """Quarterly growth capability data.""" return run_tool_with_handling( lambda: fetch_growth_data(active_data_source, code=code, year=year, quarter=quarter, limit=limit, format=format), context=f"get_growth_data:{code}:{year}Q{quarter}", )
  • mcp_server.py:52-52 (registration)
    Registration of financial report tools, including 'get_growth_data', by calling the register_financial_report_tools function with the MCP app and active data source.
    register_financial_report_tools(app, active_data_source)
  • Helper use case function that performs input validation, fetches raw growth data from the FinancialDataSource interface, and formats the output as a table in markdown or other specified format.
    def fetch_growth_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_growth_data(code=code, year=year, quarter=quarter) return _format_financial_df(df, code=code, year=year, quarter=quarter, dataset="Growth", format=format, limit=limit)
  • Registration function that defines and registers all financial report tools, including the get_growth_data handler using @app.tool() decorator.
    def register_financial_report_tools(app: FastMCP, active_data_source: FinancialDataSource): """ Register financial report related tools with the MCP app. """

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