Skip to main content
Glama

get_data_catalog_csv

Retrieve Japan's official government statistics catalog in CSV format by filtering with keywords, statistical fields, codes, years, or other parameters for data analysis.

Instructions

データカタログ情報をCSVで取得する.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
search_wordNo
stats_fieldNo
stats_codeNo
gov_codeNo
survey_yearsNo
open_yearsNo
stats_name_listNo
updated_dateNo
start_positionNo
limitNo

Implementation Reference

  • The core handler function implementing the get_data_catalog_csv tool. It builds query parameters from inputs and fetches CSV data from the e-Stat API's getSimpleDataCatalog endpoint using the _make_request helper.
    async def get_data_catalog_csv( search_word: str | None = None, stats_field: str | None = None, stats_code: str | None = None, gov_code: str | None = None, survey_years: str | None = None, open_years: str | None = None, stats_name_list: str | None = None, updated_date: str | None = None, start_position: int | None = None, limit: int | None = None, ) -> str: """データカタログ情報をCSVで取得する.""" params: dict = {} if search_word: params["searchWord"] = search_word if stats_field: params["statsField"] = stats_field if stats_code: params["statsCode"] = stats_code if gov_code: params["governmentCode"] = gov_code if survey_years: params["surveyYears"] = survey_years if open_years: params["openYears"] = open_years if stats_name_list: params["statsNameList"] = stats_name_list if updated_date: params["updatedDate"] = updated_date if start_position: params["startPosition"] = str(start_position) if limit: params["limit"] = str(limit) response = await _make_request( "getSimpleDataCatalog", params, format="csv", ) return cast(str, response)
  • Registers the get_data_catalog_csv function as an MCP tool using the FastMCP decorator mcp.tool().
    mcp.tool()(get_data_catalog_csv)
  • Exports the get_data_catalog_csv function in the tools package __all__ for easy import.
    "get_data_catalog_csv",
  • Imports the get_data_catalog_csv function into the tools package namespace.
    from e_stats_mcp.tools.catalog import get_data_catalog, get_data_catalog_csv

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