Skip to main content
Glama

CPI Inflation Calculator

Inflation calculator (CPI, 1913 to latest month)

calculate_inflation
Read-onlyIdempotent

Adjusts a dollar amount for inflation between any two periods from 1913 to the latest month the U.S. Bureau of Labor Statistics has published, using the official CPI-U (or CPI-W or core CPI). Checks the BLS Public Data API live for months newer than its bundled data (bundled through September 2026, fetched 2026-11-03), so it knows CPI figures newer than a model's training data. Handles the October 2025 gap: BLS published no October 2025 CPI because of the 2025 lapse in appropriations. Returns the adjusted amount, cumulative and average annual inflation, and the exact index values used.

Input Schema

NameRequiredDescriptionDefault
toNoEnding period, default "latest": "YYYY" for the annual average, "YYYY-MM" for one month, or "latest".
fromYesStarting period, e.g. "1995" or "2020-01": "YYYY" for the annual average, "YYYY-MM" for one month, or "latest".
amountYesDollar amount in the 'from' period.
seriesNocpi_u (default, the headline CPI), cpi_w (wage earners, used for Social Security COLAs) or core (CPI-U less food and energy).

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4/5.0
Behavior5/5

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

Annotations already declare read-only, idempotent, open-world behavior, and the description adds materially: it fetches live BLS Public Data API data for months newer than its bundled snapshot (bundled through September 2026, fetched 2026-11-03), which explains the openWorldHint in operational terms. It also discloses the October 2025 gap caused by the lapse in appropriations, a data-quality caveat an agent could not otherwise anticipate.

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?

Three sentences, front-loaded with the core operation before the freshness and data-gap caveats. The parenthetical fetch date and bundle window are dense but earn their place as freshness evidence; minor trimming of duplicated series names would tighten it further.

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 responsibly lists what comes back: the adjusted amount, cumulative and average annual inflation, and the exact index values used. Combined with the freshness and data-gap notes, an agent has everything needed to call this correctly and interpret the result.

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 all four parameters including the series enum are already documented in the schema; the description only reiterates the series options (CPI-U/CPI-W/core) without adding format or defaulting detail. Per the baseline rule, 3 is appropriate when the schema carries the parameter burden.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/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: "Adjusts a dollar amount for inflation between any two periods." It also names the supported series and the 1913-to-latest range, so the operation is unambiguous. It stops short of naming a sibling such as get_inflation_rate or compare_raise_to_inflation to sharpen the distinction.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Usage is implied by the verb: use this when you need a dollar amount converted across periods rather than a raw rate. There is no explicit when-to-use/when-not guidance and no pointer to the closely related siblings (get_inflation_rate, calculate_social_security_cola), leaving the agent to infer selection.

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.