Skip to main content
Glama

API Ninjas (Unofficial)

Api Ninjas Inflation

api_ninjas_inflation
Read-onlyIdempotent

API Ninjas inflation: latest monthly and yearly inflation rates by country, from the API Ninjas /inflation endpoint, which is on the vendor's paid plans only. It answers when the caller passes an API Ninjas premium-plan key as _apiKey; Pipeworx's shared key is on the free plan and cannot reach it. For keyless inflation figures use ecb_hicp_inflation (EU/EEA HICP), ons_timeseries (UK CPI, series D7G7) or get_cpi (US CPI). Returns a list of { country, type, period, monthly_rate_pct, yearly_rate_pct }. Optionally filter by country name and index type (CPI or HICP). Example: inflation({ country: "United States", type: "CPI" }).

Example tool call

This call uses example arguments supplied in the tool’s input schema.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "type": "CPI",
      "country": "United States"
    },
    "name": "api_ninjas_inflation"
  }
}

Input Schema

NameRequiredDescriptionDefault
typeNoInflation index type: 'CPI' or 'HICP'
_apiKeyNoYour API Ninjas key on a PREMIUM plan. The /inflation endpoint is not on the free plan, so this tool needs it. Free inflation figures: ecb_hicp_inflation (EU/EEA), ons_timeseries (UK, code D7G7), get_cpi (US).
countryNoCountry name, e.g. 'United States', 'Germany'

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / properties / _apiKey / description
      Previous value: -"Optional, your own API Ninjas key for higher limits; omit to use the shared Pipeworx key."New value: +"Your API Ninjas key on a PREMIUM plan. The /inflation endpoint is not on the free plan, so this tool needs it. Free inflation figures: ecb_hicp_inflation (EU/EEA), ons_timeseries (UK, code D7G7), get_cpi (US)."
  2. Changed1 schema field changed
    • changedInput schema / properties / _apiKey / description
      Previous value: -"Optional — your own API Ninjas key for higher limits; omit to use the shared Pipeworx key."New value: +"Optional, your own API Ninjas key for higher limits; omit to use the shared Pipeworx key."
  3. Added

TDQS

A4.6/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 bar is lower, and the description still adds the most important behavior: a paywall/plan restriction that makes the tool unusable with the default key. It also discloses the record shape returned. What it omits is rate limits, error behavior when the key is rejected, and pagination/coverage limits of the upstream data.

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 core capability and the paywall come first, followed by alternatives and return shape, which is good front-loading. It is dense but slightly repetitive: the free-plan alternative list appears in the description and again verbatim in the _apiKey schema description.

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 supplies the return fields itself. For a three-optional-parameter read tool, the auth/plan requirement, filters, output shape, and fallbacks together cover everything an agent needs before calling it.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so a baseline of 3 applies, but the description adds value by tying an example invocation to the parameters, clarifying that both filters are optional (all params are optional), and restating the _apiKey premium requirement in context. The CPI-vs-HICP distinction is repeated from the schema rather than expanded with further semantics.

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 names a specific resource (monthly and yearly inflation rates by country), the exact upstream endpoint (/inflation), and the optional filters, and it explicitly distinguishes itself from three named alternatives (ecb_hicp_inflation, ons_timeseries, get_cpi). An agent can tell immediately what this tool returns versus the sibling inflation sources.

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 states the decisive precondition for use (a premium-plan _apiKey, because the shared Pipeworx key is free-plan only) and routes the caller to concrete substitutes for each region when that precondition fails. When-to-use and when-not-to-use are both explicit.

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.