Skip to main content
Glama
stevecrawshaw

nomis-mcp

search_codes

Resolve dimension values to numeric codes ONS NOMIS fetch_data needs. Search concepts like geography or sex, and use a type code for geography areas.

Instructions

Resolve dimension values to the numeric codes fetch_data needs.

Codes are opaque integers (Bristol, City of is 1778384919 in TYPE424) and cannot be guessed or derived from ONS GSS codes. Always come here first.

Geography needs two steps. Searching geography without a type_code returns the list of geography types for the dataset, because the top of the geography codelist holds only a handful of country nodes and a search there matches nothing and returns success. Pick a type, then search within it:

search_codes('NM_1_1', 'geography')                     -> type list
search_codes('NM_1_1', 'geography', 'bristol', 'TYPE424')
    -> value 1778384919, geog_code E06000023

Non-geography dimensions are searched directly, no type_code needed.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
conceptYesDimension name exactly as listed by get_dataset_dimensions, e.g. 'geography', 'sex', 'item', 'c2021_sexor_6'.
patternNoText to match, case-insensitive, e.g. 'bristol'. Wildcards are added automatically. Use '*' to list everything.*
type_codeNoGeography type such as 'TYPE424'. Required to search geography areas. Omit to list the available geography types first.
dataset_idYesDataset id, e.g. NM_1_1

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Install Server

TDQS

A5/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 burden. It discloses key behaviors: codes are opaque integers that cannot be guessed, geography search without type_code returns the type list, and a geography search at the top-level codelist returns success with no matches. This is valuable operational transparency beyond the schema.

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 dense and every sentence earns its place. The core purpose is front-loaded, followed by essential behavioral caveats and concrete examples. It is longer than average, but the complexity of the two-step geography behavior justifies the length.

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, an output schema exists, and there is no annotation coverage, the description is complete. It covers the main use case, the tricky geography case, the fallback behavior, and example calls. An agent has enough context to invoke the tool correctly.

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

Parameters5/5

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

Although schema coverage is 100%, the description adds significant semantic value: it explains the relationship between concept='geography' and type_code, shows concrete call examples, and clarifies that type_code is mandatory for geography but unnecessary for other dimensions. This goes well beyond the schema's property descriptions.

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 the tool's purpose: 'Resolve dimension values to the numeric codes fetch_data needs.' This is a specific verb plus resource and clearly distinguishes it from siblings like search_datasets and get_dataset_dimensions by explaining it produces the codes required by fetch_data.

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?

The description gives explicit when-to-use guidance: 'Always come here first.' It explains the two-step geography workflow, when type_code is needed versus omitted, and that non-geography dimensions are searched directly. This leaves little ambiguity about how to use the tool correctly.

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