get_stats_fields
Retrieve a list of statistical field codes from Japan's official government statistics portal to identify available data categories for analysis.
Instructions
統計分野コード一覧を返す.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Input Schema (JSON Schema)
{
"properties": {},
"type": "object"
}
Implementation Reference
- e_stats_mcp/tools/stats_fields.py:24-26 (handler)The async handler function implementing the 'get_stats_fields' tool logic, returning the predefined STATS_FIELDS list.async def get_stats_fields() -> list[dict]: """統計分野コード一覧を返す.""" return STATS_FIELDS
- Constant list of statistics fields (dicts with 'code' and 'name') used by the get_stats_fields 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:56-56 (registration)Registration of the 'get_stats_fields' tool in the FastMCP server using the @mcp.tool() decorator.mcp.tool()(get_stats_fields)