Skip to main content
Glama
stevecrawshaw

nomis-mcp

fetch_data

Fetch observations from a NOMIS dataset using dimension filters; returns matching rows with total count and truncation flag to prevent interpreting incomplete results.

Instructions

Fetch observations from a dataset. Codes must come from search_codes.

Returns rows plus 'total', the number of records matching the query, and 'truncated'. Read them. NOMIS answers an oversized query with HTTP 200 and a body cut short with no error, so a result can look complete while holding a small fraction of the data. Never total, average or rank a truncated result; narrow the filters, or use fetch_data_to_file.

A worked example, claimant count for Bristol in the latest month:

fetch_data('NM_1_1', {'geography': '1778384919', 'sex': '7',
                      'item': '1', 'measures': '20100',
                      'time': 'latest'})

Requesting a whole geography type (e.g. 'TYPE151' for 2021 LSOAs) across several dimensions produces millions of records. Use fetch_data_to_file.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
selectNoColumns to return. Defaults to date, geography name and code, and value. Fewer columns means a smaller result.
filtersYesDimension filters, keyed by the concept names from get_dataset_dimensions, with values from search_codes. Comma-separate multiple codes. Examples: {'geography': '1778384919', 'sex': '7', 'item': '1', 'measures': '20100', 'time': 'latest'}. geography also accepts a range '1774190614...1774190617', a whole type 'TYPE424', 'POSTCODE|bs1 5tr;424', 'LATLONG|51.45;-2.58;424', or 'MAKE|my area|2013265921;2013265922'. time accepts 'latest', 'latestMINUS12', 'previous', 'prevyear', 'first', or a date '2026-07'.
dataset_idYesDataset id, e.g. NM_1_1
record_limitNoMaximum rows to return
record_offsetNoRows to skip

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Install Server

TDQS

A4.7/5.0
Behavior5/5

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

No annotations are provided, so the description carries the full behavioral disclosure burden. It excellently warns that NOMIS returns HTTP 200 with silently truncated bodies, instructs agents to read the 'truncated' flag, and warns against aggregating incomplete results. This is high-value, non-obvious behavior.

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

Conciseness5/5

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

The description is long but every section earns its place: purpose, return fields, a critical truncation warning, a concrete example, and a clear boundary with fetch_data_to_file. The most important safety and usage information is front-loaded before the example.

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?

Given the tool's complexity, absent annotations, and detailed schema, the description covers purpose, return values, failure modes, usage constraints, alternatives, and a realistic example. An output schema exists, so return-value details are not strictly required, but the description still provides them where they matter.

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

Parameters3/5

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

Schema description coverage is 100%, so the baseline is 3; the schema already documents filter syntax, geography special values, time options, defaults, and constraints. The description adds a worked example and reiterates that codes come from search_codes, but it does not materially extend the parameter semantics beyond what the schema provides.

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?

The description immediately states 'Fetch observations from a dataset', giving a specific verb and resource. It further clarifies scope with a worked example and distinguishes the tool from the sibling fetch_data_to_file by describing when that alternative should be used.

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?

Usage guidance is explicit: codes must come from search_codes, truncated results must not be aggregated, and fetch_data_to_file should be used for oversized or whole-geography-type queries. This clearly routes agents to the correct tool under the right conditions.

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

Other Tools

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/stevecrawshaw/nomis-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server