Skip to main content
Glama

Suomiatlas — Finnish area statistics

Rank Finnish areas by a metric

rank_areas
Read-only

Rank Finnish postal areas by any metric — highest or lowest income, population, unemployment, education, housing prices — nationally or within one municipality or region. Crime rates (crime_total_rate and friends) and air quality (aq_pm25_avg, aq_pm10_avg, aq_no2_avg, aq_o3_avg — annual means in µg/m³) rank municipalities instead, since both are published only at that grain; the aq_ codes are not in list_variables, pass them directly. For air quality order="bottom" gives the cleanest municipalities first and order="top" the most polluted, so "which municipality has the cleanest air?" is rank_areas with aq_pm25_avg and order="bottom" — get_air_quality answers for one place only. A municipality absent from an air-quality or crime ranking has no published value there: report it as unmeasured, never as clean or safe. A null in additionalValues means that metric is unpublished for that area, not zero. For gender_balance_20_39 the useful question is usually which areas are closest to an even split, not which are most skewed: pass order="balance" for that, since both a high and a low ratio mean imbalance. Get valid metric codes from list_variables. near plus withinKm narrows the ranking to areas within a straight-line radius of another place. That is distance over the ground, never a travel or commute time. To screen areas on several metrics at once — "above-average family share and below-average housing prices" — rank by one metric and pass the rest as includeVariables; that is a single call. Do not call get_place_stats per area to collect a second metric.

Input Schema

NameRequiredDescriptionDefault
nearNoKeep only areas within `withinKm` of this place — a postal area or municipality, by name or code, e.g. "Tampere", "00100". Distance is centre to centre in a straight line.
yearNoYear; defaults to the newest with data.
limitNoRows to return, 1–100 (default 10).
orderNoHighest first (default), lowest first, or — for a metric whose ideal value is a specific number rather than an extreme — closest to that value first. "balance" is currently valid only for gender_balance_20_39, whose target is an even 1.0; asking for it on any other metric is an error. For aq_* metrics "bottom" is cleanest first.
scopeNoLimit to one municipality or region by name or code, e.g. "Espoo", "Uusimaa". Not applicable to crime or air-quality rankings, which are national lists of municipalities — use `near` + `withinKm` to narrow those.
withinKmNoRadius in kilometres around `near`. Required with `near`, and only with it.
variableCodeYesMetric code from list_variables, e.g. "hr_mtu", "unemployment_rate", or an air-quality code such as "aq_pm25_avg".
includeVariablesNoExtra metric codes to report for each ranked area, as `additionalValues` on every row. Each metric's own year is given in `includedVariables`, since the sources run to different years. Not available for municipality-grain rankings (crime, air quality).

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / properties / limit / description
      Previous value: -"Rows to return (default 10)."New value: +"Rows to return, 1–100 (default 10)."
  2. Changed1 schema field changed
    • changedInput schema / properties / near / description
      Previous value: -"Keep only areas within `withinKm` of this place — a postal area or municipality, by name or code. Distance is centre to centre in a straight line."New value: +"Keep only areas within `withinKm` of this place — a postal area or municipality, by name or code, e.g. \"Tampere\", \"00100\". Distance is centre to centre in a straight line."
  3. First observed

TDQS

A4.8/5.0
Behavior5/5

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

Beyond readOnlyHint and openWorldHint, the description discloses important behavior: crime and air quality are municipality-grain, aq_ codes are not in list_variables, absent values must be treated as unmeasured rather than clean or safe, and null additionalValues means unpublished rather than zero. These are substantive operational caveats not supplied by annotations.

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?

The description is front-loaded with the core action and then systematically covers edge cases, but it is a dense single paragraph. Its length is defensible for an eight-parameter analytical tool, though some schema-overlapping detail could be trimmed.

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?

For a complex ranking tool with no output schema, it explains return-related semantics such as additionalValues, includedVariables, null handling, and municipality-grain limitations. It gives an agent enough context to call the tool correctly without opening sibling tools.

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

Parameters4/5

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

Schema coverage is 100%, so the schema already documents all eight parameters in detail. The description adds useful cross-parameter meaning, especially the aq_ exception, straight-line distance interpretation, order="balance" rationale, and includeVariables workflow, though much of this overlaps the schema.

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 opens with a specific verb and resource: rank Finnish postal areas by any metric. It clearly distinguishes postal-area rankings from municipality-grain crime and air-quality rankings, and names related tools such as get_air_quality and list_variables.

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?

It explicitly says when to use rank_areas versus get_air_quality, how to obtain metric codes from list_variables, and how to screen multiple metrics with includeVariables instead of repeated get_place_stats calls. It also explains exclusions such as crime and air quality not supporting scope narrowing.

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.

Resources