Skip to main content
Glama

get_dataset

Retrieve statistical datasets from Japan's official government portal, enabling access to census data, economic indicators, and demographic information across 17 fields.

Instructions

データセットを参照する.

Args: dataset_id: 取得対象のデータセットID(省略時は利用可能一覧) start_position: データ取得開始位置 limit: 取得件数

Returns: データセット情報

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
dataset_idNo
start_positionNo
limitNo

Implementation Reference

  • The async handler function implementing the 'get_dataset' tool logic. It constructs parameters for dataset_id, start_position, and limit, then calls _make_request to the e-Stat API 'json/refDataset' endpoint and returns the response.
    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)
  • Registration of the 'get_dataset' tool using the FastMCP mcp.tool() decorator.
    mcp.tool()(get_dataset)
  • Import of the get_dataset function into main.py for registration.
    from e_stats_mcp.tools import ( get_data_catalog, get_data_catalog_csv, get_dataset, get_meta_info, get_meta_info_csv, get_stats_fields, get_stats_data, get_stats_data_bulk, get_stats_data_csv, get_stats_list, get_stats_list_csv, post_dataset, search_stats_by_keyword, )
  • Export of get_dataset in tools/__init__.py __all__ list.
    "get_dataset",
  • Import of the _make_request helper used by the handler.
    from e_stats_mcp.tools.stats import _make_request

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