Skip to main content
Glama

Kildeverk

Get data from an SSB table

statistics_get_data
Read-onlyIdempotent

Fetch numbers from an SSB table as labelled rows. Choose values per dimension in select with codes from statistics_describe_table: a list of codes, '*' for all, {'latest': N} for the last N periods, or {'from': code}. Dimensions you leave out are totalled where SSB allows it; time defaults to the latest period. The size is checked before anything is fetched.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "table_id": "<table_id>"
    },
    "name": "statistics_get_data"
  }
}

Input Schema

NameRequiredDescriptionDefault
langNoLanguage of titles and labels. Codes are the same in both.en
selectNoValues to fetch per dimension code. A time dimension left out gets its latest value; other dimensions that can be omitted are totalled.
max_rowsNo
table_idYesSSB table id, e.g. '07459'. Find ids with statistics_search_tables.
codelistsNoOptional codelist per dimension, e.g. {'Region': 'agg_Fylker2024'} to get counties. Codes in `select` then refer to that codelist.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.1/5.0
Behavior4/5

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

Annotations already declare readOnly, idempotent, non-destructive, open-world. The description adds real context: omitted dimensions are totalled where SSB permits, time defaults to the latest period, output is labelled rows, and size is validated before fetching. It stops short of describing pagination or what a size rejection looks like.

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?

Three dense sentences, front-loaded with the action and followed by the select syntax and defaults. No filler, though the enumeration of select forms is slightly redundant with the schema.

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

Completeness4/5

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

For a 5-parameter nested-schema tool with no output schema, the description covers the critical semantics (select forms, defaults, totalling, pre-fetch size check). Minor gaps remain around max_rows behavior, codelists usage, and return shape, but the schema and annotations carry most of the rest.

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 80%, so the schema already documents table_id, lang, select options, codelists and max_rows. The description's explanation of select forms ('*', {'latest': N}, {'from': code}) largely restates the schema, though the default/totalling behavior adds some meaning. max_rows, lang and codelists are untouched, so baseline 3 is right.

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 and resource ('Fetch numbers from an SSB table as labelled rows') and immediately differentiates the workflow from statistics_describe_table, which supplies the dimension codes. An agent can tell this is the data-retrieval step rather than the metadata step.

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?

Clear workflow context: codes must come from statistics_describe_table, and the description explains what happens to omitted dimensions. It does not explicitly exclude or compare against siblings like statistics_series or statistics_rank, so no full when-not guidance.

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.