get_stats_fields
Retrieve statistical field codes from Japan's e-Stat portal to identify available data categories for research and analysis.
Instructions
統計分野コード一覧を返す.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- e_stats_mcp/tools/stats_fields.py:24-26 (handler)The main handler function for the get_stats_fields MCP tool. It returns a predefined list of statistics fields dictionaries.async def get_stats_fields() -> list[dict]: """統計分野コード一覧を返す.""" return STATS_FIELDS
- Hardcoded constant STATS_FIELDS containing the list of 17 statistics fields, each with code and name, directly returned by the handler.STATS_FIELDS = [ {"code": "01", "name": "国土・気象"}, {"code": "02", "name": "人口・世帯"}, {"code": "03", "name": "労働・賃金"}, {"code": "04", "name": "農林水産業"}, {"code": "05", "name": "鉱工業"}, {"code": "06", "name": "商業・サービス業"}, {"code": "07", "name": "企業・家計・経済"}, {"code": "08", "name": "住宅・土地・建設"}, {"code": "09", "name": "エネルギー・水"}, {"code": "10", "name": "運輸・観光"}, {"code": "11", "name": "情報通信・科学技術"}, {"code": "12", "name": "教育・文化・スポーツ・生活"}, {"code": "13", "name": "行財政"}, {"code": "14", "name": "司法・安全・環境"}, {"code": "15", "name": "社会保障・衛生"}, {"code": "16", "name": "国際"}, {"code": "17", "name": "その他"}, ]
- e_stats_mcp/main.py:58-58 (registration)Registration of the get_stats_fields tool with the FastMCP server using the mcp.tool() decorator.mcp.tool()(get_stats_fields)
- e_stats_mcp/tools/__init__.py:18-18 (registration)Import of get_stats_fields into the tools module for exposure via __all__.from e_stats_mcp.tools.stats_fields import get_stats_fields
- e_stats_mcp/main.py:17-17 (registration)Import of get_stats_fields from tools module in main.py for MCP registration.get_stats_fields,