get_meta_info_csv
Extract metadata for statistical tables from Japan's e-Stat portal and export it in CSV format using the statistics data ID.
Instructions
統計表のメタ情報をCSVで取得する.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| stats_data_id | Yes |
Input Schema (JSON Schema)
{
"properties": {
"stats_data_id": {
"type": "string"
}
},
"required": [
"stats_data_id"
],
"type": "object"
}
Implementation Reference
- e_stats_mcp/tools/stats.py:373-384 (handler)The core handler function implementing the 'get_meta_info_csv' tool logic. It constructs parameters with the provided stats_data_id and language 'J', calls the e-Stat API endpoint 'getSimpleMetaInfo' in CSV format using _make_request, and returns the CSV response as a string.async def get_meta_info_csv(stats_data_id: str) -> str: """統計表のメタ情報をCSVで取得する.""" params = { "lang": "J", "statsDataId": stats_data_id, } response = await _make_request( "getSimpleMetaInfo", params, format="csv", ) return cast(str, response)
- e_stats_mcp/main.py:47-47 (registration)Registers the get_meta_info_csv handler as an MCP tool using the FastMCP tool decorator.mcp.tool()(get_meta_info_csv)
- e_stats_mcp/main.py:14-14 (registration)Imports the get_meta_info_csv function from e_stats_mcp.tools module as part of tool registrations.get_meta_info_csv,
- e_stats_mcp/tools/__init__.py:8-8 (helper)Re-exports get_meta_info_csv from stats.py module.get_meta_info_csv,
- e_stats_mcp/tools/__init__.py:24-24 (helper)Includes get_meta_info_csv in __all__ for easy import from tools package."get_meta_info_csv",