Skip to main content
Glama

CPI Inflation Calculator

Did a pay raise beat inflation?

compare_raise_to_inflation
Read-onlyIdempotent

Compares a pay change with CPI inflation over the same period using official BLS data through the latest published month (checked live). Returns the nominal raise, inflation, the real (inflation-adjusted) raise, the pay needed to keep pace, and the gain or shortfall. Works for salaries, hourly wages, rents or any recurring amount.

Input Schema

NameRequiredDescriptionDefault
toNoWhen to measure, default "latest": "YYYY" for the annual average, "YYYY-MM" for one month, or "latest".
fromYesWhen the old pay started, e.g. "2024-01": "YYYY" for the annual average, "YYYY-MM" for one month, or "latest".
seriesNocpi_u (default, the headline CPI), cpi_w (wage earners, used for Social Security COLAs) or core (CPI-U less food and energy).
new_payYesPay after the change, same unit.
old_payYesPay before the change (annual salary or hourly rate).

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4/5.0
Behavior4/5

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

Annotations already cover safety (readOnly, idempotent, non-destructive), so the description adds the useful bits: live-checked BLS data through the latest published month, and the specific outputs returned (nominal raise, inflation, real raise, pace-keeping pay, gain/shortfall). It stops short of describing failure modes (e.g. what happens for future or invalid dates) or unit-mismatch behavior.

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?

Three sentences, front-loaded with the operation and source, then the return payload, then applicability. No filler or restatement of the title.

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?

With no output schema, listing the five returned figures is the right compensation, and the data recency caveat is included. An agent has enough to call it correctly; only edge-case behavior (unit mismatch, out-of-range dates) is unaddressed, which is a minor gap for a read-only calculation tool.

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 coverage is 100%, so the schema already documents every parameter including the series enum and date formats. The description adds only modest meaning beyond that: the period must be shared between old and new pay, and the amounts can be any recurring quantity, not just salary. That is a small but real addition.

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 compound operation ("compares a pay change with CPI inflation over the same period") and even names the data source (official BLS data, latest published month). This is clearly distinct from siblings like get_inflation_rate or calculate_inflation, which supply inputs rather than doing the raise-vs-inflation comparison.

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?

The closing sentence gives implied applicability ("salaries, hourly wages, rents or any recurring amount"), which tells an agent the input domain. However, it never says when to prefer this over calculate_inflation or get_inflation_rate, nor any prerequisite such as matching units or period ordering.

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.