Skip to main content
Glama

Invokely official statistics

Compare places

compare
Read-onlyIdempotent

Compare one indicator across 2 to 10 places for the same period, using one shared source and definition whenever possible. Use it for "how does X compare with Y and Z". Places can mix levels, for example a city, a larger city and its region. Example: {"indicator": "registered_unemployment_rate", "places": ["Mataró", "Barcelona", "Cataluña"]}. Returns {indicator, period, comparable, values: [{place, value, period?, status?}], source or sources, notes?}. When comparable is false the values come from different sources (and sometimes periods) and notes explain why; mention it in your answer. For unemployment in municipalities use registered_unemployment_rate: the survey unemployment_rate is not published below province level. transform applies the same rule to every place, for example {"indicator": "gdp", "places": ["Spain", "Germany", "France"], "transform": "per_capita"}. Population and price index series shared by every place are preferred; each value lists its inputs, and comparable is false when places needed different ones or a place could not be computed (notes say why). With as_of every value is the one Invokely held then, with version, known_since, revised_later and current; comparable reflects the sources available then.

Input Schema

NameRequiredDescriptionDefault
baseNoindex: the period equal to 100, for example "2015" or "2020-01" (a year of a monthly series is the average of its months). real: the year whose prices values are expressed in, for example "2024".
as_ofNoOptional point in time, UTC: a date ("2026-10-03", meaning the end of that day) or a date and time with a zone ("2026-10-03T14:30:00Z"). Returns the figures as Invokely held them at that instant, for backtests, audits and reproducible runs. Must not be in the future.
periodNoOptional. "2024" (year), "2024-Q3" (quarter), "2024-S1" (half year) or "2024-09" (month). Omit for the latest value.
placesYesPlace names or ids.
windowNorolling_mean only: number of periods averaged, 2 to 12. Default 3.
countryNoOptional ISO 3166-1 alpha-2 code to disambiguate the place, for example "ES" or "US".
indicatorYesIndicator id from search_indicators, for example "population", "registered_unemployment_rate", "unemployment_rate", "cpi_annual_change", "net_income_per_person".
transformNoOptional calculation done by the server, with every input cited. pct_change: % change from the previous period. yoy: % change from the same period a year earlier (12 months, 4 quarters or 1 year back). diff, yoy_diff: the same changes as differences, in the indicator unit (percentage points for rates). index: value / value in base x 100 (needs base). rolling_mean: average of the last window periods. per_capita, per_1000, per_100k: a total (population, births, GDP, emissions) divided by the population of the same place and year. real: a money amount at current prices adjusted for inflation with the consumer price index of the place's country in the same currency (base: price year, default the latest complete year). share_of_parent: a total as % of the parent place (county of its state, state of the nation, region of its country). Per person and share transforms refuse rates, shares, indices, medians and per person values, and share_of_parent also refuses net balances such as net migration; pct_change, yoy and index refuse percentages.
citation_styleNoOptional. Adds source.citations with the citation in this style (APA 7, MLA 9, Chicago author-date, Harvard, BibTeX or RIS), or in all six with "all". The publisher is the author. Leave it out to keep the response short.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed5 schema fields changed
    • addedInput schema / properties / as_of
      Added value: +{
      +  "description": "Optional point in time, UTC: a date (\"2026-10-03\", meaning the end of that day) or a date and time with a zone (\"2026-10-03T14:30:00Z\"). Returns the figures as Invokely held them at that instant, for backtests, audits and reproducible runs. Must not be in the future.",
      +  "maxLength": 32,
      +  "type": "string"
      +}
    • addedInput schema / properties / base
      Added value: +{
      +  "description": "index: the period equal to 100, for example \"2015\" or \"2020-01\" (a year of a monthly series is the average of its months). real: the year whose prices values are expressed in, for example \"2024\".",
      +  "maxLength": 10,
      +  "type": "string"
      +}
    • addedInput schema / properties / citation_style
      Added value: +{
      +  "description": "Optional. Adds source.citations with the citation in this style (APA 7, MLA 9, Chicago author-date, Harvard, BibTeX or RIS), or in all six with \"all\". The publisher is the author. Leave it out to keep the response short.",
      +  "enum": [
      +    "apa",
      +    "mla",
      +    "chicago",
      +    "harvard",
      +    "bibtex",
      +    "ris",
      +    "all"
      +  ],
      +  "type": "string"
      +}
    • addedInput schema / properties / transform
      Added value: +{
      +  "description": "Optional calculation done by the server, with every input cited. pct_change: % change from the previous period. yoy: % change from the same period a year earlier (12 months, 4 quarters or 1 year back). diff, yoy_diff: the same changes as differences, in the indicator unit (percentage points for rates). index: value / value in base x 100 (needs base). rolling_mean: average of the last window periods. per_capita, per_1000, per_100k: a total (population, births, GDP, emissions) divided by the population of the same place and year. real: a money amount at current prices adjusted for inflation with the consumer price index of the place's country in the same currency (base: price year, default the latest complete year). share_of_parent: a total as % of the parent place (county of its state, state of the nation, region of its country). Per person and share transforms refuse rates, shares, indices, medians and per person values, and share_of_parent also refuses net balances such as net migration; pct_change, yoy and index refuse percentages.",
      +  "enum": [
      +    "pct_change",
      +    "yoy",
      +    "diff",
      +    "yoy_diff",
      +    "index",
      +    "rolling_mean",
      +    "per_capita",
      +    "per_1000",
      +    "per_100k",
      +    "real",
      +    "share_of_parent"
      +  ],
      +  "type": "string"
      +}
    • addedInput schema / properties / window
      Added value: +{
      +  "description": "rolling_mean only: number of periods averaged, 2 to 12. Default 3.",
      +  "maximum": 12,
      +  "minimum": 2,
      +  "type": "integer"
      +}
  2. Changed1 schema field changed
    • changedInput schema / properties / places / items / description
      Previous value: -"Place name or id. Examples: \"Mataró\", \"Barcelona\", \"provincia de Barcelona\", \"Cataluña\", \"España\", \"Germany\", \"EU\", \"es-mun-08121\", \"08121\" (INE code), \"ES51\" (NUTS), \"Texas\", \"Travis County, Texas\", \"us-county-48453\", \"fips:48453\" (US county FIPS)."New value: +"Place name or id. Examples: \"Mataró\", \"Barcelona\", \"provincia de Barcelona\", \"Cataluña\", \"España\", \"Germany\", \"EU\", \"es-mun-08121\", \"08121\" (INE code), \"ES51\" (NUTS), \"Texas\", \"Travis County, Texas\", \"us-county-48453\", \"fips:48453\" (US county FIPS), \"Austin, TX\", \"us-place-4805000\", \"fips:4805000\" (US city GEOID)."
  3. First observed

TDQS

A4.6/5.0
Behavior5/5

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

Annotations already declare readOnly/idempotent/non-destructive, and the description adds substantial extra behavior: what comparable=false means, that notes explain the divergence and should be surfaced to the user, how transform inputs are cited, when a value cannot be computed, and exactly how as_of changes the returned fields (version, known_since, revised_later, current).

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 core purpose, then progressively adds edge cases. It is dense and long, with some repetition of the transform example, but nearly every sentence carries operational information an agent needs.

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?

There is no output schema, so the description carries the return-value burden and does so explicitly (indicator, period, comparable, values[], source/sources, notes). Combined with the schema's full parameter coverage, an agent has everything needed to call and interpret this tool.

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 baseline is 3, but the description goes beyond it: it documents the return fields for as_of, gives a worked example payload for both transform and plain comparison, and states the refusal rules for rate/share/index indicators under per-capita and share transforms.

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 ('Compare one indicator across 2 to 10 places for the same period'), plus the scope constraints (shared source, mixed place levels). This clearly distinguishes it from siblings like rank_places, get_value, and get_series, which each handle a different shape of query.

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 use case ('how does X compare with Y and Z') and a routing rule between indicators for unemployment (registered_unemployment_rate is published below province level, unemployment_rate is not). It does not, however, explicitly name sibling alternatives such as rank_places or get_value and when to prefer them.

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