get_meta_info
Retrieve metadata for statistical tables from Japan's official government data portal, including classifications and time periods, using the table ID.
Instructions
統計表のメタ情報を取得する.
Args: stats_data_id: 統計表ID
Returns: メタ情報(分類事項、時間軸など)
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:155-170 (handler)The main handler function for the 'get_meta_info' tool. It takes a stats_data_id parameter, constructs API params, calls _make_request to the e-Stat 'json/getMetaInfo' endpoint, and returns the response as dict.async def get_meta_info(stats_data_id: str) -> dict: """統計表のメタ情報を取得する. Args: stats_data_id: 統計表ID Returns: メタ情報(分類事項、時間軸など) """ params = { "lang": "J", "statsDataId": stats_data_id, } response = await _make_request("json/getMetaInfo", params) return cast(dict[str, Any], response)
- e_stats_mcp/main.py:46-46 (registration)Registers the get_meta_info function as an MCP tool using the FastMCP mcp.tool() decorator.mcp.tool()(get_meta_info)
- e_stats_mcp/main.py:13-13 (registration)Imports the get_meta_info function from e_stats_mcp.tools for use in main.py.get_meta_info,
- e_stats_mcp/tools/__init__.py:7-7 (registration)Re-exports get_meta_info from stats.py in tools/__init__.py.get_meta_info,