Skip to main content
Glama

Uk Ons Get Observations

uk_ons_get_observations
Read-onlyIdempotent

UK ONS filterable datasets (the cube API: CPIH cpih01, earnings ASHE, census, regional and local-authority tables): fetch observations from a dataset/edition/version. Pass dimension filters as dimensions map ({"geography": "K02000001", "time": "2023"}). Use * for "all values" within a dimension. The single headline UK numbers (latest CPI, unemployment, GDP growth) come from ons_timeseries.

Example tool call

This call uses example arguments supplied in the tool’s input schema.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "edition": "time-series",
      "version": "1",
      "dataset_id": "cpih01",
      "dimensions": {
        "time": "2023",
        "geography": "K02000001"
      }
    },
    "name": "uk_ons_get_observations"
  }
}

Input Schema

NameRequiredDescriptionDefault
editionYesEdition label
versionYesVersion
dataset_idYesONS dataset ID
dimensionsYesDimension code -> value (or "*" for all). Example: {"geography":"K02000001","time":"2023"}.

Output Schema

NameRequiredDescriptionDefault
notesYesUsage notes
editionYesEdition label
versionYesVersion
dataset_idYesDataset ID
observationsYesObservation rows
unit_of_measureYesUnit of measurement
total_observationsYesTotal number of observations

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / properties / dimensions / description
      Previous value: -"Dimension code → value (or \"*\" for all). Example: {\"geography\":\"K02000001\",\"time\":\"2023\"}."New value: +"Dimension code -> value (or \"*\" for all). Example: {\"geography\":\"K02000001\",\"time\":\"2023\"}."
  2. Added

TDQS

A4/5.0
Behavior4/5

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

Annotations already declare readOnly=true, idempotent=true, destructive=false, openWorld=true, so the safety profile is covered. The description adds real behavioral context beyond them: the API family (cube API), the shape of the dimensions map, and the `*` wildcard meaning 'all values within a dimension'. It says nothing about response size, row limits, or pagination for what is potentially a large observation pull, which is the main remaining gap.

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 resource and verb, then the filtering mechanics, then the sibling redirect — a sensible order with no filler sentences. The opening parenthetical listing dataset families is dense but earns its place by telling the agent which datasets qualify; only minor tightening is possible.

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

Completeness3/5

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

An output schema exists, so return values need not be explained, and the dimension-filter mechanics are covered. However, all four parameters are required and the description never explains where to get a valid dataset_id/edition/version, which is the biggest practical obstacle to calling this tool correctly; for a nested-object, four-required-param tool this leaves a meaningful gap.

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 coverage is 100%, and the schema already documents the dimensions map as 'Dimension code -> value (or "*" for all)' with the same example object. The description's dimension example and wildcard note therefore largely restate structured data, and it adds no meaning for dataset_id, edition, or version beyond their names. Baseline 3 is appropriate where the schema carries the semantics.

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 pair ('fetch observations from a dataset/edition/version') scoped to 'UK ONS filterable datasets (the cube API)', and enumerates the dataset families it covers (CPIH, ASHE, census, regional/local-authority). It explicitly distinguishes itself from the ons_timeseries sibling, so an agent can tell the two apart without opening either schema.

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

Usage Guidelines4/5

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

Gives clear routing guidance for the most likely confusion: headline single-number queries (latest CPI, unemployment, GDP growth) go to ons_timeseries, while filtered multi-dimensional pulls belong here. It stops short of saying how to obtain the required dataset_id/edition/version (e.g. via uk_ons_list_datasets or list_editions), so one discovery step is left implicit.

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.