Skip to main content
Glama

Kildeverk

Rank municipalities or counties on a statistic

statistics_rank
Read-onlyIdempotent

Every municipality or county ranked on one SSB statistic for one period, highest or lowest first, with Norway's figure for reference. Give compare_to for an earlier period to rank by change instead ('which municipalities grew fastest since 2015?'). Uses SSB's figures for today's borders where the table has them.

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_rank"
  }
}

Input Schema

NameRequiredDescriptionDefault
levelNomunicipality
limitNo
orderNohighest
periodNoe.g. '2025'. Defaults to the latest.
filtersNoCodes for the table's other dimensions.
measureNoContentsCode, when there are several.
table_idYesSSB table, e.g. '07459'.
min_valueNoLeave out regions whose value is below this, e.g. 1000 when ranking change, so that tiny municipalities with large swings don't top the list.
compare_toNoAn earlier period. Adds the change to each row and ranks by it.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.6/5.0
Behavior3/5

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

Annotations already declare readOnly, idempotent, open-world and non-destructive behavior, so the safety profile is covered. The description adds real value beyond that: the national figure is included for reference, compare_to injects a change column and re-ranks by it, and the caveat that today's borders are used where the table supports them. It says nothing about truncation at the 400 limit or how filters affect completeness.

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?

Two dense sentences plus a parenthetical example, front-loaded with what the tool returns. Nothing is wasted, though the second sentence packs the compare_to branch and the border caveat together, which slightly blurs the priority order.

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?

With no output schema, the description must convey the return shape, and it only partially does — a ranked row set plus a national reference figure and an optional change column. It does not say what fields a row contains, whether the limit truncates the ranking, or how nested filters interact with the ranking. Adequate for a 9-parameter tool but with clear gaps.

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 67%, so most parameters are already documented in the schema, including min_value, compare_to and period. The description reinforces the compare_to semantics and the ranking-by-change behavior, but leaves level, order, limit and the nested filters object entirely to the schema. Baseline 3 is appropriate.

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

Purpose4/5

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

States a specific verb and resource ('Every municipality or county ranked on one SSB statistic for one period') and adds scope details — one statistic, one period, highest/lowest ordering, national figure as reference. It does not explicitly distinguish itself from siblings such as compare_municipalities, so it stops short of a 5.

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 a concrete usage branch: 'Give compare_to for an earlier period to rank by change instead', reinforced with a natural-language example question. It offers no when-not guidance or named alternatives (e.g. statistics_get_data for full rows, statistics_series for time series), so it is clear but not exhaustive.

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.