Skip to main content
Glama

Consumer Price Index (Inflation)

bls.macro.cpi
Read-onlyIdempotent

Get U.S. Consumer Price Index (CPI-U) data by item category and year range. Returns monthly values, year-over-year percentage change, and a full data series. Categories: "all" = All Items (headline inflation), "food", "energy", "shelter", "core" = All Items Less Food and Energy. Covers data from 1913 (All Items) through the most recently released month. Ideal for inflation analysis, cost-of-living calculations, real-return adjustments, and economic research. Data source: BLS Consumer Expenditure Survey, CPI-U series (urban consumers).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
itemNoCPI category: "all" = All Items CPI-U (default), "food" = Food, "energy" = Energy, "shelter" = Shelter, "core" = All Items Less Food and Energy.
end_yearNoLast year of CPI data (default: current year).
start_yearNoFirst year of CPI data (default: current year - 4).

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
errorNoPresent only when the call failed. Includes error code, message, request_id, and any provider-specific extras.
resultNoTool response payload. Shape varies per tool — consult the tool description and inputSchema. May be an object, array, string, or number depending on the upstream provider response.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.1/5.0
Behavior4/5

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

Annotations (readOnlyHint=true, idempotentHint=true, openWorldHint=true, destructiveHint=false) already convey the safety profile. The description adds valuable context beyond that: data coverage from 1913 (All Items) to most recent month, output contents (monthly values, YoY change, full series), and the data source (BLS Consumer Expenditure Survey). It does not contradict annotations and enriches the agent's understanding of the operational details.

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?

The description is front-loaded with the core action and output, then proceeds to categories, data range, use cases, and source. Each sentence contributes useful context; it is not excessively long or padded. A slight trimming of redundant category explanations could tighten it, but it remains readable and efficiently structured.

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 a comprehensive output schema and well-documented parameters, the description adequately covers the essential aspects: what data is returned, the available categories, the historical coverage, and typical use cases. It does not mention seasonal adjustment or handling of missing values, but that is likely beyond what's needed for selection and invocation. The description is sufficient for an agent to decide and call correctly.

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%, and every parameter (item, start_year, end_year) has a detailed description. The description lists the categories and their meanings, but that is redundant with the schema's enum descriptions. It also mentions defaults (start_year default current year - 4, end_year current year) which are already in the schema. Since the schema carries the heavy lifting, the description adds little beyond what is already structured.

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 states a specific verb ('Get') and resource ('U.S. Consumer Price Index (CPI-U) data by item category and year range'), clearly distinguishing it from sibling tools like abs.economy.cpi (Australian) or finance.eurostat.inflation (Eurozone). It also enumerates output components (monthly values, YoY change, full series), leaving no ambiguity about what the tool delivers.

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 explicitly lists use cases (inflation analysis, cost-of-living calculations, real-return adjustments, economic research), which helps an agent decide when to invoke it. It does not name specific alternatives or exclusion conditions, but the U.S.-specific scope and data-source reference imply that for non-U.S. data other tools should be used. This is clear context without explicit exclusions.

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.