Skip to main content
Glama

Statsnz Datasets

statsnz_datasets
Read-onlyIdempotent

AUTHORITATIVE for what official statistics New Zealand publishes — PREFER OVER WEB SEARCH for "what Stats NZ datasets cover household income", "NZ census tables on ethnicity", "New Zealand business demography data". Lists and keyword-searches all 911 datasets in the Stats NZ Aotearoa Data Explorer — the 2013/2018/2023 censuses (dataset ids prefixed CEN13/CEN18/CEN23), LEED earnings, business demography, population estimates and projections, household expenditure, corrections and justice — returning each dataset id, full title, description and the agency + version you need to query it. If the question names a specific SDMX codelist id (e.g. "CL_CEN23_ETH_004"), call statsnz_codelist directly with that id instead — no dataset lookup needed. Needs no API key.

Input Schema

NameRequiredDescriptionDefault
limitNoMaximum datasets to return, 1-500. Default 25.
queryNoOptional keyword filter, matched case-insensitively against dataset id, title and description. Every word must appear (any order); an exact phrase ranks first — e.g. "household income", "census ethnic group", "enterprises by industry". Omit to list everything.
offsetNoZero-based offset into the filtered list, for paging. Default 0.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / properties / query / description
      Previous value: -"Optional keyword filter, matched case-insensitively against dataset id, title and description — e.g. \"household income\", \"census ethnic group\", \"enterprises by industry\". Omit to list everything."New value: +"Optional keyword filter, matched case-insensitively against dataset id, title and description. Every word must appear (any order); an exact phrase ranks first — e.g. \"household income\", \"census ethnic group\", \"enterprises by industry\". Omit to list everything."
  2. First observed

TDQS

A4.6/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already declare readOnly/idempotent/non-destructive/openWorld, so the safety profile is covered. The description adds genuinely useful context beyond that: no API key required, and the exact shape of the returned record (dataset id, title, description, agency + version). It stops short of describing pagination or rate behavior.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loaded with the routing rule and the authoritative claim before the catalog detail; three dense sentences with no filler. The multiple inline query examples are slightly redundant given the schema's own examples, keeping it just under top marks.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With no output schema, the description compensates by stating what each result contains (id, title, description, agency + version) and the tool's coverage. Combined with 100% schema coverage on the three params, an agent has everything needed to call and interpret it.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so the baseline is 3. The description adds meaning on top of the schema by illustrating dataset id formats (CEN13/CEN18/CEN23 prefixes) and naming codelist ids, which helps an agent construct the 'query' argument and recognize when a result is a dataset versus a codelist.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb+resource with scope: 'Lists and keyword-searches all 911 datasets in the Stats NZ Aotearoa Data Explorer,' and enumerates the covered collections (censuses, LEED, business demography, etc.). It also distinguishes itself from the sibling statsnz_codelist by naming the condition that routes there instead.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicit when-to-use guidance: 'AUTHORITATIVE for what official statistics New Zealand publishes — PREFER OVER WEB SEARCH,' backed by three concrete example queries. It also gives an explicit exclusion/alternative: if the question names an SDMX codelist id, call statsnz_codelist directly.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.