Skip to main content
Glama

Treasury Yields API - US Yield Curve, Daily History, No Key

treasury_yields_api
Read-onlyIdempotent

US Treasury yields as JSON, no API key: the daily par yield curve (1M to 30Y), real yields (TIPS), T-bill rates and long-term rates, with 10Y-2Y, 10Y-3M, 30Y-5Y and 2Y-3M spreads, an inversion flag, day-over-day change in basis points and full history since 1990. Modes: latest, one date (nearest previous business day on holidays), history range (daily, weekly or monthly), spreads, and inversion periods. Source: U.S. Department of the Treasury (public domain). Monitor mode returns only new business days. Free: 5 calls/day per IP. Paid: Radar API key (from €9/mo at https://radarbg.com/pricing#starter via X-API-Key) or $0.001/call via x402 at https://radarbg.com/x402/treasury-yields-api.

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": {
      "mode": "history",
      "curve": "nominal",
      "limit": 20,
      "frequency": "daily"
    },
    "name": "treasury_yields_api"
  }
}

Input Schema

NameRequiredDescriptionDefault
dateNoFor mode date: the day you want, YYYY-MM-DD, for example 2024-03-15.
modeNolatest = the newest yield curve; date = one day (a holiday or weekend returns the previous business day and says so); history = every business day between Start and End date; spreads = spread time series only; inversion = periods when 10Y-2
curveNonominal = daily par yield curve (1M-30Y, since 1990); real = real yield curve / TIPS (5Y-30Y, since 2003); bills = T-bill bank discount and coupon equivalent rates (since 2002); longterm = long-term composite and 20Y CMT (since 2000). Sprea
limitNoMaximum rows returned (newest kept when the range is longer). Between 1 and 20000.
endDateNoFor history, spreads and inversion: last day, YYYY-MM-DD. Default today.
frequencyNoFor history and spreads: daily (every business day), weekly (last business day of each week) or monthly (last business day of each month).
startDateNoFor history, spreads and inversion: first day, YYYY-MM-DD. Default 30 days before End date. Max range 40 years.
maturitiesNoOptional filter, for example 2Y, 10Y, 3M, 30Y. Empty = every maturity of the curve.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.4/5.0
Behavior5/5

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

Goes well past the readOnly/openWorld/idempotent annotations: it discloses the free-tier cap (5 calls/day per IP), the paid paths (Radar API key via X-API-Key, or $0.001/call via x402), the data source and public-domain status, and the historical coverage start dates per curve. It also flags the behavioral quirk that a holiday or weekend date returns the previous business day and says so.

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?

Front-loaded with the resource and data scope, then modes, then source, then access/pricing; almost every clause carries information. The single dense sentence style and the trailing pricing URLs are the only mild bloat, though the auth cost details do earn their place.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With 8 optional parameters and no output schema, the description does describe the returned payload (curve, spreads, inversion flag, basis-point change, history), which is the main gap it needed to fill. However, it never delimits the modes from one another operationally (e.g., which parameters are ignored per mode), leaving real ambiguity for a parameterless-required tool.

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 the schema already has the baseline covered; the description nonetheless adds meaning the schema does not, notably monitor mode returning only new business days and the mode-to-parameter mapping (date for single-day, start/end for ranges). It leaves limit behavior and maturity filtering largely to the schema.

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?

Names a specific resource and verb-equivalent ("US Treasury yields as JSON") and then scopes it precisely: daily par curve 1M-30Y, real/TIPS yields, T-bills, long-term rates, four named spreads, inversion flag, and history since 1990. That coverage set clearly separates it from adjacent siblings such as mortgage_rates_api or central_bank_rates_api without naming them.

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?

Enumerates the operating modes (latest, one date, history range, spreads, inversion periods, plus monitor) and notes the holiday fallback, which tells an agent how to pick a mode. It stops short of explicit when-not guidance or naming an alternative tool for overlapping questions.

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.

Resources