get_money_supply_data_month
Retrieve monthly money supply data for China's A-share market analysis. Specify date ranges to access macroeconomic indicators for financial research.
Instructions
Monthly money supply data.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| start_date | No | ||
| end_date | No | ||
| limit | No | ||
| format | No | markdown |
Implementation Reference
- src/tools/macroeconomic.py:51-59 (handler)The primary handler function for the 'get_money_supply_data_month' tool. Decorated with @app.tool(), it captures parameters and delegates execution to the use case via run_tool_with_handling for consistent error handling, logging, and execution.@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", )
- src/use_cases/macroeconomic.py:31-35 (helper)Core helper function fetch_money_supply_data_month that performs data retrieval from the FinancialDataSource interface using get_money_supply_data_month, validates output format, and formats the resulting DataFrame as a 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)
- mcp_server.py:55-55 (registration)Registration point where register_macroeconomic_tools is called on the FastMCP app instance, which internally defines and registers the get_money_supply_data_month tool along with other macroeconomic tools.register_macroeconomic_tools(app, active_data_source)