Skip to main content
Glama

Get historical CPI observations

economics_get_cpi_history
Read-onlyIdempotent

CPI by period. index_base is sent once at the top; each period has its value. For only the newest value use economics_get_cpi. as_of (YYYY-MM-DD) reads the series as published up to the end of that UTC day, with the derived measures of the same release; version=first_reported gives the first value stored for each period, with first_reported_at. Send one, not both. When source is present, the data came through a distributor and released_on is the distributor's publication date, not the original publisher's release date.

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": {
      "country": "<country>"
    },
    "name": "economics_get_cpi_history"
  }
}

Input Schema

NameRequiredDescriptionDefault
endNoLast period or day to return, inclusive: `YYYY`, `YYYY-MM` or `YYYY-Q1` (for example `2025`, `2025-06`, `2025-Q2`). Leave out for no upper bound.
as_ofNoReturn the series as published up to the end of this UTC day, with the derived measures (inflation, GDP growth) of that same release. Not combined with version.
limitNoMost rows to return in one answer. Default 100, max 1000.
startNoFirst period or day to return, inclusive: `YYYY`, `YYYY-MM` or `YYYY-Q1` (for example `2025`, `2025-06`, `2025-Q2`). Leave out for no lower bound.
cursorNoPaging token. Leave out for the first page; to read the next one, pass the previous answer's `next_cursor` back unchanged with the same other arguments.
countryYesCountry as a three-letter ISO 3166-1 code in capitals, for example `USA`, `IDN` or `JPN`.
versionNofirst_reported returns the first value Narwhal stored for each period, with first_reported_at. Not combined with as_of.

Output Schema

NameRequiredDescriptionDefault
as_ofNoWhen the source last updated the newest observation on this page.
startNoNever sent: every account gets the full history.
sourceNoPresent only when a distributor, not the original publisher, supplies the data.
countryYes
frequencyNoPresent, as annual, only when the figures are yearly (the World Bank fallback). Periods are then YYYY and each value is the average of the year's monthly indices.
index_baseYesBase period and base value of the index, for example 1982-84=100.
next_cursorYes
observationsYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed5 schema fields changed
    • addedInput schema / properties / country / description
      Added value: +"Country as a three-letter ISO 3166-1 code in capitals, for example `USA`, `IDN` or `JPN`."
    • addedInput schema / properties / cursor / description
      Added value: +"Paging token. Leave out for the first page; to read the next one, pass the previous answer's `next_cursor` back unchanged with the same other arguments."
    • addedInput schema / properties / end / description
      Added value: +"Last period or day to return, inclusive: `YYYY`, `YYYY-MM` or `YYYY-Q1` (for example `2025`, `2025-06`, `2025-Q2`). Leave out for no upper bound."
    • addedInput schema / properties / limit / description
      Added value: +"Most rows to return in one answer. Default 100, max 1000."
    • addedInput schema / properties / start / description
      Added value: +"First period or day to return, inclusive: `YYYY`, `YYYY-MM` or `YYYY-Q1` (for example `2025`, `2025-06`, `2025-Q2`). Leave out for no lower bound."
  2. First observed

TDQS

A4.3/5.0
Behavior4/5

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

Annotations already establish this is a read-only, idempotent, non-destructive query, so the description doesn't need to restate safety. It does add real context beyond them: the vintage semantics of `as_of` versus `first_reported`, and the caveat that distributor-sourced rows carry the distributor's publication date rather than the original publisher's. Some of this ("not combined with", `first_reported_at`) duplicates what the input schema already states, which keeps it from a 5.

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?

Short and front-loaded: response shape first, then the sibling alternative, then the two vintage modes, then the distributor caveat. The phrasing is telegraphic in places ("CPI by period", "Send one, not both"), which is efficient but slightly terse for an agent that has not seen 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?

An output schema exists, so return values need not be spelled out, and the read-only annotations cover the safety profile. The description covers the selection logic between vintages and the sibling, leaving only minor gaps such as pagination expectations despite the default `limit` of 100.

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 description coverage is 100%, so the schema already documents `start`, `end`, `limit`, `cursor`, `country`, `as_of` and `version`, including their mutual exclusion. The description restates the as_of/version rule and explains the response shape of `index_base`/`value`, but adds no syntax, defaults, or boundary behavior beyond the schema; baseline 3 is appropriate.

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?

"CPI by period" plus the explanation that `index_base` is returned once and `value` per period gives a precise picture of a historical-vintage CPI series. It explicitly separates itself from the sibling `economics_get_cpi` ("For only the newest value use ..."), so an agent can choose between them without opening either schema.

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 names the alternative for the newest-value case and states the selection rule for the two vintage modes: `as_of` reads the series as published up to a UTC day, `version=first_reported` returns first-stored values, and "Send one, not both." It also flags that a `source` value means distributor data with a distributor `released_on`, which affects how results should be interpreted.

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