Skip to main content
Glama

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

NameRequiredDescriptionDefault
dataset_idNo
start_positionNo
limitNo

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

  • 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)
  • 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)
  • Registers the get_dataset function as an MCP tool using FastMCP's mcp.tool() decorator.
    mcp.tool()(get_dataset)
  • Imports get_dataset for exposure via the tools package __init__.
    from e_stats_mcp.tools.dataset import get_dataset, post_dataset

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/koizumikento/e-stats-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server