Skip to main content
Glama
24mlight

A-Share MCP Server

get_required_reserve_ratio_data

Retrieve required reserve ratio data for analyzing China's monetary policy and banking system liquidity, with customizable date ranges and output formats.

Instructions

Required reserve ratio data.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
start_dateNo
end_dateNo
year_typeNo0
limitNo
formatNomarkdown

Implementation Reference

  • MCP tool handler function implementing the tool logic, decorated with @app.tool() for registration, wraps use case execution with standardized error handling.
    @app.tool()
    def get_required_reserve_ratio_data(start_date: Optional[str] = None, end_date: Optional[str] = None, year_type: str = '0', limit: int = 250, format: str = "markdown") -> str:
        """Required reserve ratio data."""
        return run_tool_with_handling(
            lambda: fetch_required_reserve_ratio_data(
                active_data_source, start_date=start_date, end_date=end_date, year_type=year_type, limit=limit, format=format
            ),
            context="get_required_reserve_ratio_data",
        )
  • Use case orchestrator that validates inputs, fetches raw data from FinancialDataSource, and formats the output as markdown table.
    def fetch_required_reserve_ratio_data(data_source: FinancialDataSource, *, start_date: Optional[str], end_date: Optional[str], year_type: str, limit: int, format: str) -> str:
        validate_output_format(format)
        validate_year_type_reserve(year_type)
        df = data_source.get_required_reserve_ratio_data(start_date=start_date, end_date=end_date, year_type=year_type)
        meta = {"dataset": "required_reserve_ratio", "start_date": start_date, "end_date": end_date, "year_type": year_type}
        return format_table_output(df, format=format, max_rows=limit, meta=meta)
  • Interface definition (schema) for the data source method, specifying expected parameters and return type (pd.DataFrame).
    @abstractmethod
    def get_required_reserve_ratio_data(self, start_date: Optional[str] = None, end_date: Optional[str] = None, year_type: str = '0') -> pd.DataFrame:
        """Fetches required reserve ratio data."""
        pass
  • Baostock-specific implementation of the data source method, delegating to shared _fetch_macro_data helper which calls baostock.query_required_reserve_ratio_data.
    def get_required_reserve_ratio_data(self, start_date: Optional[str] = None, end_date: Optional[str] = None, year_type: str = '0') -> pd.DataFrame:
        """Fetches required reserve ratio data using Baostock."""
        # Note the extra yearType parameter handled by kwargs
        return _fetch_macro_data(bs.query_required_reserve_ratio_data, "Required Reserve Ratio", start_date, end_date, yearType=year_type)
  • Registration function that defines and registers all macroeconomic tools including get_required_reserve_ratio_data using FastMCP @app.tool() decorators.
    def register_macroeconomic_tools(app: FastMCP, active_data_source: FinancialDataSource):
        """Register macroeconomic tools."""
    
        @app.tool()
        def get_deposit_rate_data(start_date: Optional[str] = None, end_date: Optional[str] = None, limit: int = 250, format: str = "markdown") -> str:
            """Benchmark deposit rates."""
            return run_tool_with_handling(
                lambda: fetch_deposit_rate_data(active_data_source, start_date=start_date, end_date=end_date, limit=limit, format=format),
                context="get_deposit_rate_data",
            )
    
        @app.tool()
        def get_loan_rate_data(start_date: Optional[str] = None, end_date: Optional[str] = None, limit: int = 250, format: str = "markdown") -> str:
            """Benchmark loan rates."""
            return run_tool_with_handling(
                lambda: fetch_loan_rate_data(active_data_source, start_date=start_date, end_date=end_date, limit=limit, format=format),
                context="get_loan_rate_data",
            )
    
        @app.tool()
        def get_required_reserve_ratio_data(start_date: Optional[str] = None, end_date: Optional[str] = None, year_type: str = '0', limit: int = 250, format: str = "markdown") -> str:
            """Required reserve ratio data."""
            return run_tool_with_handling(
                lambda: fetch_required_reserve_ratio_data(
                    active_data_source, start_date=start_date, end_date=end_date, year_type=year_type, limit=limit, format=format
                ),
                context="get_required_reserve_ratio_data",
            )
    
        @app.tool()
        def get_money_supply_data_month(start_date: Optional[str] = None, end_date: Optional[str] = None, limit: int = 250, format: str = "markdown") -> str:
            """Monthly money supply data."""
            return run_tool_with_handling(
                lambda: fetch_money_supply_data_month(
                    active_data_source, start_date=start_date, end_date=end_date, limit=limit, format=format
                ),
                context="get_money_supply_data_month",
            )
    
        @app.tool()
        def get_money_supply_data_year(start_date: Optional[str] = None, end_date: Optional[str] = None, limit: int = 250, format: str = "markdown") -> str:
            """Yearly money supply data."""
            return run_tool_with_handling(
                lambda: fetch_money_supply_data_year(
                    active_data_source, start_date=start_date, end_date=end_date, limit=limit, format=format
                ),
                context="get_money_supply_data_year",
            )
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 what the tool does operationally - whether it retrieves, calculates, or processes data; what format the output takes; whether it has rate limits; or any authentication requirements. It's completely inadequate for a tool with 5 parameters.

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 (3 words), this is a case of under-specification rather than effective brevity. The description is too sparse to be useful, failing to convey essential information that would help an agent understand and use the tool correctly.

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 tool with 5 parameters, no annotations, no output schema, and 0% schema description coverage, the description is completely inadequate. It provides no information about what the tool returns, how to use its parameters, what the data represents, or any behavioral characteristics. This leaves the agent with insufficient information to use the tool effectively.

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 for all 5 parameters, the description provides absolutely no information about what the parameters mean or how they should be used. The description doesn't mention any parameters at all, failing completely to compensate for the schema's lack of documentation.

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 'Required reserve ratio data.' is a tautology that essentially restates the tool name. It mentions the resource ('required reserve ratio data') but lacks a specific verb or action, making the purpose vague. It doesn't distinguish this tool from its many siblings, which all appear to retrieve various financial datasets.

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?

The description provides no guidance on when to use this tool versus alternatives. With 40+ sibling tools for different financial data types (e.g., 'get_deposit_rate_data', 'get_money_supply_data_month'), there's no indication of what makes this tool unique or when it should be chosen over similar 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