Scope: Japan e-Gov catalog datasets.
Fetch + preview one JP dataset resource (XLS / XLSX / CSV) via MCP server.
This is the ONLY way to see resource content. Your host sandbox
almost certainly does NOT whitelist e-stat.go.jp — you cannot curl
those files directly. This tool downloads on the MCP-server side and
returns structured rows.
or specifics of any dataset**. Never respond "I don't have network access to fetch that" — this tool IS the fetch.
Args:
dataset_id: CKAN name (e.g. "maff_20180521_0148").
resource_index: 0-based index from jp_list_resources. Prefer this
over resource_name for precision.
resource_name: alternative — partial (substring) match on the
resource's name field.
sheet: for XLS/XLSX — sheet name or 0-based index. Default = first
sheet (which is what you want 95% of the time; e-Stat XLS
almost always ship a single sheet named '1').
limit: rows to return (default 30, hard cap 500). Bump to 100-500
when the user wants municipality-level or item-level detail.
Returns: - CSV: {columns, rows[]} - XLS/XLSX: {sheet_names[], active_sheet, sheet_dims, rows[]} rows is list-of-lists (positional). - error variants when file is missing/unsupported/HTTP failure.
e-Stat legacy XLS: BIFF5/BIFF8 · Shift-JIS 表頭 · handled automatically by xlrd 1.2.0. Merged-cell headers are typical — don't expect a clean first-row header; scan rows 3-8 for the real column labels.