Skip to main content
Glama

Invokely official statistics

Get one value

get_value
Read-onlyIdempotent

Get one official figure for an indicator and place: the latest by default, or a given period. Use it for questions like "population of Mataró", "inflation in Spain in 2024-09", "unemployment rate in Cataluña", "unemployment rate in Texas". Example: {"indicator": "population", "place": "Mataró"}. Returns {indicator: {id, name, unit}, place: {id, name, level}, period, value, status?, source: {name, title, url, retrieved, published?, citation, inputs?}, note?}. note is a caveat about the source series served. Pass citation_style ("apa", "mla", "chicago", "harvard", "bibtex", "ris" or "all") when the user wants a formatted reference: the source block then carries citations {style: text}. Always cite source.citation or source.url when you answer. When source.via is present (Data Commons), the publisher is still the original agency; the citation already names both. status "provisional" or "estimated" means the figure may be revised; say so. status "low_reliability" means the publisher flags the figure as of low reliability (usually a small survey sample); say so and treat it as a rough indication. If the indicator is not published for that place you get an error that names the levels where it exists and related indicators that do have data. Calculated figures: pass transform instead of doing the arithmetic yourself. Examples: {"indicator": "gdp", "place": "Spain", "transform": "per_capita"}, {"indicator": "median_household_income", "place": "Texas", "period": "2019", "transform": "real", "base": "2024"}, {"indicator": "registered_unemployment", "place": "Mataró", "transform": "yoy"}. The result adds transform {id, name, description, unit, from_unit, base?, notes?} and inputs [{role, indicator, place, period, value, unit, source}]; indicator.unit is the unit of the result. Cite the inputs' sources as well. A value that cannot be computed (no earlier period, no population for that year) is a NO_DATA error with the reason, never an estimate. Without period, when the latest period cannot be computed yet (this year's population not published), the latest period that can, at most two years earlier, is returned and transform.notes says so: quote the period returned. status is set when the value or any input is provisional or estimated. Point in time: pass as_of for "what was reported for September as of October 3". The answer adds as_of, version, known_since (when Invokely first held that version), revised_later and, when the figure changed since, current {value, status?, version, known_since}; say that it was revised. Source choice follows the same rules applied to the data held then. Before Invokely first stored the figure you get NO_DATA with vintage_coverage_starts, never today's value. With a transform, every input (earlier value, population, parent place, price index) is read as held at as_of, and each input carries version and known_since.

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.
placeYesPlace 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).
periodNoOptional. "2024" (year), "2024-Q3" (quarter), "2024-S1" (half year) or "2024-09" (month). Omit for the latest value.
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".
frequencyNoOptional. Force a frequency when the indicator exists in several (for example monthly and annual unemployment).
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 / place / 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, so the description is free to spend its words on behavior, which it does extensively: status semantics ('provisional', 'estimated', 'low_reliability' and the instruction to say so), NO_DATA error behavior with reasons and vintage_coverage_starts, revision handling with current{} when a figure changed, and the two-year fallback rule for computability. This is well beyond what the annotations convey.

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?

Purpose is front-loaded in sentence one and the long body is information-dense rather than padded. There is some duplication of schema-documented parameters (transform behavior, base, citation_style), and the run-on versioning paragraph could be tightened, but the volume is defensible for a 10-parameter tool with no output schema.

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?

With no output schema, the description must carry return-value documentation and does: a full field listing, the transform/inputs additions, as_of/version/known_since/revised_later, and the status caveats. It also covers the failure modes an agent will actually hit (indicator-not-published errors that name available levels and related indicators). Nothing material is missing.

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 still adds meaning: it distinguishes transform semantics (per_capita, real with base, yoy) with concrete payloads, explains as_of as a point-in-time/backtest control, and describes what citation_style does to the response ('the source block then carries citations {style: text}'). Much of this is echoed in the schema, which keeps it below a 5.

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 opening sentence states a specific verb and resource with scope: 'Get one official figure for an indicator and place: the latest by default, or a given period.' The singular 'one figure' framing implicitly separates it from series/compare/rank siblings, and the worked examples ('population of Mataró', 'inflation in Spain in 2024-09') make the intended granularity unambiguous.

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?

It gives concrete question patterns that should route here and prescriptive guidance such as 'pass transform instead of doing the arithmetic yourself' and 'always cite source.citation or source.url.' What it lacks is an explicit alternative: it never names get_series, compare or search_indicators as the tool to reach for when the request is multi-period or multi-place.

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