Skip to main content
Glama

post_dataset

Register datasets to Japan's official statistics portal by specifying dataset names, statistical table IDs, and retrieval conditions for data analysis.

Instructions

データセットを登録する.

Args: dataset_name: データセット名 stats_data_id: 統計表ID conditions: 取得条件(cdCatXX, cdTime, cdArea などを辞書で指定) description: 説明文

Returns: 登録結果

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
dataset_nameYes
stats_data_idYes
conditionsNo
descriptionNo

Implementation Reference

  • The core handler function for the 'post_dataset' tool. It constructs parameters from inputs and makes an asynchronous POST request to the e-Stat API's 'postDataset' endpoint to register the dataset.
    async def post_dataset( dataset_name: str, stats_data_id: str, conditions: dict | None = None, description: str | None = None, ) -> dict: """データセットを登録する. Args: dataset_name: データセット名 stats_data_id: 統計表ID conditions: 取得条件(cdCatXX, cdTime, cdArea などを辞書で指定) description: 説明文 Returns: 登録結果 """ params = { "datasetName": dataset_name, "statsDataId": stats_data_id, } if description: params["description"] = description if conditions: params.update(conditions) response = await _make_request( "postDataset", params, method="POST", data=params, ) return cast(dict[str, Any], response)
  • Registers the 'post_dataset' function as an MCP tool using the FastMCP decorator mcp.tool().
    mcp.tool()(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