get_dataset
Retrieve or list statistical datasets from Japan's official government statistics portal (e-Stat) by specifying dataset ID, start position, and limit parameters.
Instructions
データセットを参照する.
Args: dataset_id: 取得対象のデータセットID(省略時は利用可能一覧) start_position: データ取得開始位置 limit: 取得件数
Returns: データセット情報
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| dataset_id | No | ||
| start_position | No | ||
| limit | No |
Input Schema (JSON Schema)
{
"properties": {
"dataset_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null
},
"limit": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null
},
"start_position": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null
}
},
"type": "object"
}
Implementation Reference
- e_stats_mcp/tools/dataset.py:46-70 (handler)The core handler function implementing the get_dataset tool logic, which retrieves dataset information from the e-Stat API.async def get_dataset( dataset_id: str | None = None, start_position: int | None = None, limit: int | None = None, ) -> dict: """データセットを参照する. Args: dataset_id: 取得対象のデータセットID(省略時は利用可能一覧) start_position: データ取得開始位置 limit: 取得件数 Returns: データセット情報 """ params: dict = {} if dataset_id: params["datasetId"] = dataset_id if start_position: params["startPosition"] = str(start_position) if limit: params["limit"] = str(limit) response = await _make_request("json/refDataset", params) return cast(dict[str, Any], response)
- e_stats_mcp/tools/dataset.py:46-70 (schema)Input schema defined by function parameters (dataset_id, start_position, limit optional) and output as dict, with detailed docstring.async def get_dataset( dataset_id: str | None = None, start_position: int | None = None, limit: int | None = None, ) -> dict: """データセットを参照する. Args: dataset_id: 取得対象のデータセットID(省略時は利用可能一覧) start_position: データ取得開始位置 limit: 取得件数 Returns: データセット情報 """ params: dict = {} if dataset_id: params["datasetId"] = dataset_id if start_position: params["startPosition"] = str(start_position) if limit: params["limit"] = str(limit) response = await _make_request("json/refDataset", params) return cast(dict[str, Any], response)
- e_stats_mcp/main.py:53-53 (registration)Registers the get_dataset function as an MCP tool using FastMCP's mcp.tool() decorator.mcp.tool()(get_dataset)
- e_stats_mcp/tools/__init__.py:16-16 (registration)Imports get_dataset for exposure via the tools package __init__.from e_stats_mcp.tools.dataset import get_dataset, post_dataset