Skip to main content
Glama

Get Cpi

get_cpi
Read-onlyIdempotent

Current US inflation rate (CPI year-over-year) and Consumer Price Index history for All Urban Consumers, US city average, all items. Returns monthly index values with computed yoy_inflation_pct per month plus a latest summary carrying BOTH adjustments — answers "what is the latest inflation rate" and "what is the current CPI-U index level" directly. Defaults to the not-seasonally-adjusted index CUUR0000SA0, the series BLS headlines; pass seasonally_adjusted: true for the seasonally adjusted index CUSR0000SA0 (the FRED CPIAUCSL series). The two differ by roughly a point, so the answer states which one it used.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
_apiKeyNoOptional BLS registration key (free, raises the daily cap from ~25 to 500). The gateway supplies a platform key; pass your own only to override.
end_yearNoEnd year as 4-digit string (e.g. "2024"). Optional.
start_yearNoStart year as 4-digit string (e.g. "2020"). Optional.
seasonally_adjustedNotrue returns the seasonally adjusted CPI-U index (BLS series CUSR0000SA0, same series as FRED CPIAUCSL); false or omitted returns the not-seasonally-adjusted index (CUUR0000SA0), which is the series BLS headlines and the basis of the published year-over-year inflation rate. Set it to true when the question says seasonally adjusted.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
dataYesMonthly CPI data
unitYesUnit of measurement (index 1982-84=100)
totalYesNumber of data points returned. Equal to `returned` — BLS returns every point in the requested year range.
latestNoMost recent observation, carrying BOTH seasonal adjustments so the caller can tell which number answers their question. Absent when the range returned no usable data points.
end_yearYesEnd year filter if provided, null otherwise
returnedNoHow many data points are in `data`. Always equal to `total` here; stated so a caller need not assume it.
series_idYesBLS series ID actually used — CUUR0000SA0 (not seasonally adjusted) or CUSR0000SA0 (seasonally adjusted)
start_yearYesStart year filter if provided, null otherwise
descriptionYesSeries description, naming the seasonal adjustment used
observation_orderNoOrder of the `data` array. BLS returns each series newest-first.
seasonally_adjustedYesWhether the returned series is seasonally adjusted (CUSR0000SA0) or not (CUUR0000SA0)

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. Changed3 schema fields changed
    • addedOutput schema / properties / observation_order
      Added value: +{
      +  "description": "Order of the `data` array. BLS returns each series newest-first.",
      +  "enum": [
      +    "newest_first"
      +  ],
      +  "type": "string"
      +}
    • addedOutput schema / properties / returned
      Added value: +{
      +  "description": "How many data points are in `data`. Always equal to `total` here; stated so a caller need not assume it.",
      +  "type": "integer"
      +}
    • changedOutput schema / properties / total / description
      Previous value: -"Total number of data points returned"New value: +"Number of data points returned. Equal to `returned` — BLS returns every point in the requested year range."
  2. Changed9 schema fields changed
    • changedInput schema / examples
      Previous value: -[
      -  {
      -    "end_year": "2024",
      -    "start_year": "2020"
      -  }
      -]New value: +[
      +  {
      +    "seasonally_adjusted": true
      +  },
      +  {
      +    "end_year": "2024",
      +    "start_year": "2020"
      +  }
      +]
    • addedInput schema / properties / seasonally_adjusted
      Added value: +{
      +  "description": "true returns the seasonally adjusted CPI-U index (BLS series CUSR0000SA0, same series as FRED CPIAUCSL); false or omitted returns the not-seasonally-adjusted index (CUUR0000SA0), which is the series BLS headlines and the basis of the published year-over-year inflation rate. Set it to true when the question says seasonally adjusted.",
      +  "type": "boolean"
      +}
    • addedOutput schema / properties / data / items / properties / date
      Added value: +{
      +  "description": "First day of the covered period as an ISO date, derived from the BLS period code",
      +  "type": [
      +    "string",
      +    "null"
      +  ]
      +}
    • addedOutput schema / properties / data / items / properties / yoy_inflation_pct
      Added value: +{
      +  "description": "Year-over-year percent change vs the same month a year earlier, or null when the prior-year month is not in range",
      +  "type": [
      +    "number",
      +    "null"
      +  ]
      +}
    • changedOutput schema / properties / description / description
      Previous value: -"Series description"New value: +"Series description, naming the seasonal adjustment used"
    • addedOutput schema / properties / latest
      Added value: +{
      +  "description": "Most recent observation, carrying BOTH seasonal adjustments so the caller can tell which number answers their question. Absent when the range returned no usable data points.",
      +  "properties": {
      +    "date": {
      +      "description": "ISO date of the latest observation",
      +      "type": [
      +        "string",
      +        "null"
      +      ]
      +    },
      +    "index_value": {
      +      "description": "Index level of the series that was requested",
      +      "type": "number"
      +    },
      +    "index_value_nsa": {
      +      "description": "Not-seasonally-adjusted index level (CUUR0000SA0) for the same month",
      +      "type": [
      +        "number",
      +        "null"
      +      ]
      +    },
      +    "index_value_sa": {
      +      "description": "Seasonally adjusted index level (CUSR0000SA0) for the same month",
      +      "type": [
      +        "number",
      +        "null"
      +      ]
      +    },
      +    "seasonally_adjusted": {
      +      "description": "Which adjustment index_value is",
      +      "type": "boolean"
      +    },
      +    "yoy_inflation_pct": {
      +      "description": "Year-over-year percent change for the latest month, or null when the prior-year month is out of range",
      +      "type": [
      +        "number",
      +        "null"
      +      ]
      +    }
      +  },
      +  "required": [
      +    "date",
      +    "index_value",
      +    "seasonally_adjusted",
      +    "index_value_sa",
      +    "index_value_nsa",
      +    "yoy_inflation_pct"
      +  ],
      +  "type": "object"
      +}
    • addedOutput schema / properties / seasonally_adjusted
      Added value: +{
      +  "description": "Whether the returned series is seasonally adjusted (CUSR0000SA0) or not (CUUR0000SA0)",
      +  "type": "boolean"
      +}
    • changedOutput schema / properties / series_id / description
      Previous value: -"BLS series ID (CUUR0000SA0)"New value: +"BLS series ID actually used — CUUR0000SA0 (not seasonally adjusted) or CUSR0000SA0 (seasonally adjusted)"
    • changedOutput schema / required
      Previous value: -[
      -  "series_id",
      -  "description",
      -  "unit",
      -  "start_year",
      -  "end_year",
      -  "total",
      -  "data"
      -]New value: +[
      +  "series_id",
      +  "seasonally_adjusted",
      +  "description",
      +  "unit",
      +  "start_year",
      +  "end_year",
      +  "total",
      +  "data"
      +]
  3. Changed1 schema field changed
    • addedInput schema / properties / _apiKey
      Added value: +{
      +  "description": "Optional BLS registration key (free, raises the daily cap from ~25 to 500). The gateway supplies a platform key; pass your own only to override.",
      +  "type": "string"
      +}
  4. Changed1 schema field changed
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "properties": {
      +    "data": {
      +      "description": "Monthly CPI data",
      +      "items": {
      +        "properties": {
      +          "month": {
      +            "description": "Month name (e.g., January)",
      +            "type": "string"
      +          },
      +          "period": {
      +            "description": "Period code (e.g., M01)",
      +            "type": "string"
      +          },
      +          "value": {
      +            "description": "CPI index value",
      +            "type": "number"
      +          },
      +          "year": {
      +            "description": "Year of the observation",
      +            "type": "string"
      +          }
      +        },
      +        "required": [
      +          "year",
      +          "month",
      +          "period",
      +          "value"
      +        ],
      +        "type": "object"
      +      },
      +      "type": "array"
      +    },
      +    "description": {
      +      "description": "Series description",
      +      "type": "string"
      +    },
      +    "end_year": {
      +      "description": "End year filter if provided, null otherwise",
      +      "type": [
      +        "string",
      +        "null"
      +      ]
      +    },
      +    "series_id": {
      +      "description": "BLS series ID (CUUR0000SA0)",
      +      "type": "string"
      +    },
      +    "start_year": {
      +      "description": "Start year filter if provided, null otherwise",
      +      "type": [
      +        "string",
      +        "null"
      +      ]
      +    },
      +    "total": {
      +      "description": "Total number of data points returned",
      +      "type": "integer"
      +    },
      +    "unit": {
      +      "description": "Unit of measurement (index 1982-84=100)",
      +      "type": "string"
      +    }
      +  },
      +  "required": [
      +    "series_id",
      +    "description",
      +    "unit",
      +    "start_year",
      +    "end_year",
      +    "total",
      +    "data"
      +  ],
      +  "type": "object"
      +}
  5. Changed1 schema field changed
    • addedInput schema / examples
      Added value: +[
      +  {
      +    "end_year": "2024",
      +    "start_year": "2020"
      +  }
      +]
  6. First observed

TDQS

A4.5/5.0
Behavior5/5

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

Annotations already cover read-only, idempotent, and non-destructive behavior. The description adds meaningful behavioral details: it defaults to the NSA series, explains the SA alternative, notes the ~1 point difference, and promises that the answer states which adjustment was used. This goes well beyond the annotations.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is dense but every sentence earns its place. It front-loads the primary purpose, then details the return payload, default series, the SA option, and the adjustment disclosure. No unnecessary words.

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 an output schema present, the description still covers the essential call-time knowledge: what the tool returns, the default behavior, the seasonal adjustment option, and the impact of the chosen series. Nothing needed to invoke the tool correctly is missing.

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 baseline is 3. The description reinforces the seasonally_adjusted parameter's meaning (NSA vs SA series, BLS/FRED equivalents), but does not add new parameter-level semantics beyond what the schema already provides.

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 clearly identifies the tool's function: returning the current US inflation rate and CPI-U history for All Urban Consumers. It specifies the exact resource (monthly index values) and the computed metric (yoy_inflation_pct), which is distinct enough even among sibling data tools.

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?

The description gives concrete use cases: it directly answers 'what is the latest inflation rate' and 'what is the current CPI-U index level.' It also explains when to set seasonally_adjusted to true. It does not explicitly name alternative tools or say when not to use it, but the context is clear.

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.