Skip to main content
Glama
24mlight

A Share MCP

by 24mlight

get_money_supply_data_month

Retrieve monthly money supply data to analyze economic conditions and monetary policy trends for financial research and market analysis.

Instructions

Monthly money supply data.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
start_dateNo
end_dateNo
limitNo
formatNomarkdown

Implementation Reference

  • The MCP tool handler implementation. Decorated with @app.tool() to register and execute the tool logic by delegating to the use case function with shared error handling.
    @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",
        )
  • Abstract method in the FinancialDataSource interface defining the expected signature for monthly money supply data retrieval.
    @abstractmethod
    def get_money_supply_data_month(self, start_date: Optional[str] = None, end_date: Optional[str] = None) -> pd.DataFrame:
        """Fetches monthly money supply data (M0, M1, M2)."""
        pass
  • Use case helper that validates input, fetches raw data from the data source, and formats the output as markdown table.
    def fetch_money_supply_data_month(data_source: FinancialDataSource, *, start_date: Optional[str], end_date: Optional[str], limit: int, format: str) -> str:
        validate_output_format(format)
        df = data_source.get_money_supply_data_month(start_date=start_date, end_date=end_date)
        meta = {"dataset": "money_supply_month", "start_date": start_date, "end_date": end_date}
        return format_table_output(df, format=format, max_rows=limit, meta=meta)
  • Concrete data source implementation that queries Baostock API for monthly money supply data (M0, M1, M2).
    def get_money_supply_data_month(self, start_date: Optional[str] = None, end_date: Optional[str] = None) -> pd.DataFrame:
        """Fetches monthly money supply data (M0, M1, M2) using Baostock."""
        # Baostock expects YYYY-MM format for dates here
        return _fetch_macro_data(bs.query_money_supply_data_month, "Monthly Money Supply", start_date, end_date)
  • Registration function that defines and registers all macroeconomic tools including get_money_supply_data_month using @app.tool() decorators. Called from mcp_server.py.
    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. It offers no behavioral information: doesn't indicate if this is a read-only operation, what data source is used, whether it requires authentication, rate limits, or what the output format looks like. The description is purely declarative without operational context.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Extremely concise with just three words, but this brevity comes at the cost of completeness. The description is front-loaded with the core concept but lacks necessary elaboration for a tool with 4 parameters and no annotations.

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?

For a tool with 4 parameters, 0% schema description coverage, no annotations, and no output schema, the description is severely inadequate. It doesn't explain what the tool returns, how to interpret results, or provide enough context for effective use beyond the basic subject matter.

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 parameters are undocumented. The description adds no parameter information beyond what's inferred from the tool name (monthly data). It doesn't explain what start_date/end_date formats to use, what limit applies to, what format options exist, or default behaviors.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose3/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description 'Monthly money supply data' states the resource (money supply data) and temporal granularity (monthly), but lacks a clear verb indicating what action is performed. It distinguishes from sibling 'get_money_supply_data_year' by specifying monthly vs yearly data, but doesn't clarify if this retrieves, lists, or calculates data.

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?

No guidance on when to use this tool versus alternatives like 'get_money_supply_data_year' or other economic data tools. The description implies monthly frequency but doesn't specify use cases, prerequisites, or exclusions.

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