Skip to main content
Glama

treasury-fiscaldata-mcp-server

Get Treasury Interest Rates

treasury_get_interest_rates
Read-onlyIdempotent

Average interest rates Treasury pays on its outstanding securities by security type. Answers "what is the government's cost of borrowing?" Covers every type Treasury reports — marketable issues, non-marketable series, and the aggregate totals — and which types it reports changes over the years, so omit security_type to see the ones a given period carries. Rates are percentages, not basis points. Updated monthly (end-of-month records). Mode "latest" returns the most recent month's rates for all or one security type; "series" returns a time history, staging the result as a DataCanvas table when canvas_id is set or the range matches more than 200 rows — read the table's column schema with treasury_dataframe_describe, then run SQL over it with treasury_dataframe_query.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
modeNo"latest" returns the most recent month's rates. "series" returns a time range.latest
end_dateNoISO 8601 end date for mode=series. Defaults to today.
canvas_idNoSet any non-empty value to stage mode=series results as a DataCanvas table for SQL analysis — the value only requests staging; the server picks the table name. Staging also happens on its own when a series matches more than 200 rows. The assigned name (df_XXXXX_XXXXX) comes back in the output canvas_id; pass it to treasury_dataframe_describe, then treasury_dataframe_query. Requires CANVAS_PROVIDER_TYPE=duckdb.
start_dateNoISO 8601 start date for mode=series (YYYY-MM-DD, must be end-of-month for meaningful results).
security_typeNoFilter to one security type, matched exactly against the security_desc field — full case and punctuation, as in "Treasury Inflation-Protected Securities (TIPS)". Omit for every type in the period, which is how to read the set of types on offer; the response names them when a filter matches nothing.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
capNoThe preview cap applied to the inline series array.
errorNoPresent when the call failed. Absent on success.
ratesNoInterest rate records, newest first. Whole in mode=latest — a month is a bounded set. In mode=series an inline preview of at most 20 rows; compare its length against total_records to detect the cap, and reach the rest through canvas_id when one is returned.
shownNoSeries rows returned inline.
noticeNoGuidance when no records match (where the requested security type does have records, or the types the most recent month carries, or the empty date range), when the inline series is a preview, or when the series was staged as a DataCanvas table.
canvas_idNoDuckDB table name (df_XXXXX_XXXXX) holding the staged series. Pass it to treasury_dataframe_describe for the column schema, then use it as the FROM target in treasury_dataframe_query SQL. Absent when nothing was staged.
truncatedNoTrue when the inline series array holds fewer rows than were retrieved.
as_of_dateNoMost recent record date returned (YYYY-MM-DD).
total_recordsNoIn mode=latest, the number of rows in rates. In mode=series, the full upstream match — larger than rates.length whenever the preview cap applied.
canvas_expires_atNoISO 8601 expiry for the canvas dataframe.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed6 schema fields changed
    • changedInput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
    • addedInput schema / additionalProperties
      Added value: +false
    • changedOutput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
    • addedOutput schema / anyOf
      Added value: +[
      +  {
      +    "not": {
      +      "required": [
      +        "error"
      +      ]
      +    },
      +    "required": [
      +      "as_of_date",
      +      "rates",
      +      "total_records"
      +    ]
      +  },
      +  {
      +    "required": [
      +      "error"
      +    ]
      +  }
      +]
    • addedOutput schema / properties / error
      Added value: +{
      +  "additionalProperties": {},
      +  "description": "Present when the call failed. Absent on success.",
      +  "properties": {
      +    "code": {
      +      "description": "JSON-RPC error code for this failure.",
      +      "maximum": 9007199254740991,
      +      "minimum": -9007199254740991,
      +      "type": "integer"
      +    },
      +    "data": {
      +      "additionalProperties": {},
      +      "properties": {
      +        "reason": {
      +          "description": "Machine-readable failure mode.",
      +          "type": "string"
      +        },
      +        "recovery": {
      +          "additionalProperties": {},
      +          "description": "Actionable next step for the caller.",
      +          "properties": {
      +            "hint": {
      +              "type": "string"
      +            }
      +          },
      +          "required": [
      +            "hint"
      +          ],
      +          "type": "object"
      +        },
      +        "retryable": {
      +          "description": "Whether retrying may succeed.",
      +          "type": "boolean"
      +        }
      +      },
      +      "type": "object"
      +    },
      +    "message": {
      +      "description": "Human-readable description of what went wrong.",
      +      "type": "string"
      +    }
      +  },
      +  "required": [
      +    "code",
      +    "message"
      +  ],
      +  "type": "object"
      +}
    • removedOutput schema / required
      Removed value: -[
      -  "as_of_date",
      -  "rates",
      -  "total_records"
      -]
  2. Changed3 schema fields changed
    • changedInput schema / properties / security_type / description
      Previous value: -"Filter to one security type. Omit for all types. Use the exact string — the API does exact-match filtering on security_desc."New value: +"Filter to one security type, matched exactly against the security_desc field — full case and punctuation, as in \"Treasury Inflation-Protected Securities (TIPS)\". Omit for every type in the period, which is how to read the set of types on offer; the response names them when a filter matches nothing."
    • removedInput schema / properties / security_type / enum
      Removed value: -[
      -  "Treasury Bills",
      -  "Treasury Notes",
      -  "Treasury Bonds",
      -  "Treasury Inflation-Protected Securities (TIPS)",
      -  "Treasury Floating Rate Notes (FRN)",
      -  "Total Marketable",
      -  "Total Non-marketable",
      -  "Total Interest-bearing Debt"
      -]
    • changedOutput schema / properties / notice / description
      Previous value: -"Guidance when no records match (lists valid security types, or notes the empty date range), when the inline series is a preview, or when the series was staged as a DataCanvas table."New value: +"Guidance when no records match (where the requested security type does have records, or the types the most recent month carries, or the empty date range), when the inline series is a preview, or when the series was staged as a DataCanvas table."
  3. Changed8 schema fields changed
    • changedInput schema / properties / canvas_id / description
      Previous value: -"DataCanvas table name (df_XXXXX_XXXXX) to register series results into for SQL analysis. When provided, or when mode=series and results exceed 200 rows, the result is registered and canvas_id is returned. Use treasury_dataframe_query to query it. Requires CANVAS_PROVIDER_TYPE=duckdb."New value: +"Set any non-empty value to stage mode=series results as a DataCanvas table for SQL analysis — the value only requests staging; the server picks the table name. Staging also happens on its own when a series matches more than 200 rows. The assigned name (df_XXXXX_XXXXX) comes back in the output canvas_id; pass it to treasury_dataframe_describe, then treasury_dataframe_query. Requires CANVAS_PROVIDER_TYPE=duckdb."
    • changedOutput schema / properties / canvas_id / description
      Previous value: -"DataCanvas table name for series results. Use treasury_dataframe_query to run SQL."New value: +"DuckDB table name (df_XXXXX_XXXXX) holding the staged series. Pass it to treasury_dataframe_describe for the column schema, then use it as the FROM target in treasury_dataframe_query SQL. Absent when nothing was staged."
    • addedOutput schema / properties / cap
      Added value: +{
      +  "description": "The preview cap applied to the inline series array.",
      +  "type": "number"
      +}
    • changedOutput schema / properties / notice / description
      Previous value: -"Guidance when no records match — lists valid security types or notes the empty date range."New value: +"Guidance when no records match (lists valid security types, or notes the empty date range), when the inline series is a preview, or when the series was staged as a DataCanvas table."
    • changedOutput schema / properties / rates / description
      Previous value: -"Interest rate records."New value: +"Interest rate records, newest first. Whole in mode=latest — a month is a bounded set. In mode=series an inline preview of at most 20 rows; compare its length against total_records to detect the cap, and reach the rest through canvas_id when one is returned."
    • addedOutput schema / properties / shown
      Added value: +{
      +  "description": "Series rows returned inline.",
      +  "type": "number"
      +}
    • changedOutput schema / properties / total_records / description
      Previous value: -"Total matching records."New value: +"In mode=latest, the number of rows in rates. In mode=series, the full upstream match — larger than rates.length whenever the preview cap applied."
    • addedOutput schema / properties / truncated
      Added value: +{
      +  "description": "True when the inline series array holds fewer rows than were retrieved.",
      +  "type": "boolean"
      +}
  4. First observed

TDQS

A4.7/5.0
Behavior5/5

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

Annotations already cover read-only and idempotent behavior, so the bar is lower. The description adds substantial behavioral nuance: rates are percentages not basis points, the set of security types changes over years, data is updated monthly, and large series trigger automatic DataCanvas staging. It also discloses that canvas_id staging requires duckdb. These details go far beyond the annotations and significantly aid correct invocation.

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 dense but well-structured, starting with the core purpose and then layering details about coverage, units, update frequency, and modes. Every sentence contributes necessary information; the length is justified given the tool's complexity (5 params, two modes, staging behavior). It could be slightly trimmed in wording, but it remains focused and front-loaded with the most important facts.

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?

Given the tool's complexity and that an output schema exists, the description covers all essential operational aspects: how to use modes, parameter nuances, staging trigger conditions, and the follow-up workflow with sibling tools. It even explains the 'omit security_type' strategy for discovering available types. Nothing an agent needs to call it correctly and interpret results is missing.

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

Parameters5/5

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

Although schema coverage is 100% (all parameters documented), the description adds crucial semantic depth: security_type can be omitted to list all types and the response names types when a filter matches nothing; start_date should be end-of-month; canvas_id only requests staging and the actual table name is returned; the exact match requirement for security_type is clarified. These enrich the schema descriptions to a level that prevents common errors.

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 clearly states the tool's function: obtaining average interest rates on Treasury securities by type, with a specific verb and resource. It explicitly differentiates from siblings by naming the domain (interest rates vs debt, exchange rates) and covers the full scope of security types. The inclusion of a clarifying 'answers the government's cost of borrowing' makes the purpose immediately obvious.

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 provides explicit guidance on how to use the tool's modes ('latest' vs 'series'), when to omit security_type to discover available types, and the meaning of end-of-month for start_date. It also references sibling tools (treasury_dataframe_describe, treasury_dataframe_query) for post-processing staged results. However, it does not explicitly state when to choose this tool over alternatives like treasury_get_debt or treasury_get_exchange_rates, leaving that to the agent's domain inference.

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.