Skip to main content
Glama

treasury-fiscaldata-mcp-server

Get Treasury Exchange Rates

treasury_get_exchange_rates
Read-onlyIdempotent

Official Treasury reporting exchange rates for ~165 countries — the rates US federal agencies are required to use when converting foreign currency to USD for official reporting. Published quarterly (March 31, June 30, Sep 30, Dec 31); mode "latest" returns the most recently published quarter. Rate is expressed as foreign currency units per 1 USD (e.g., a Japan-Yen rate of 159.41 means 1 USD = 159.41 JPY). These are NOT market exchange rates and are not suitable for financial transaction pricing. Mode "series" stages the result as a DataCanvas table when canvas_id is set or the range matches more than 500 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 recently published quarter's rates. "series" returns a date range of quarterly reports.latest
end_dateNoISO 8601 end date for mode=series.
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 500 rows, which multi-year multi-country pulls do (~19,000 rows for the full history). 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.
countriesNoFilter to specific countries by exact country name (e.g., ["Japan", "Germany", "France"]). Case-sensitive, matches the "country" field. Omit for every country in the quarter (~165).
start_dateNoISO 8601 start date for mode=series. Rates are published end-of-quarter (March 31, June 30, Sep 30, Dec 31).

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
capNoThe preview cap applied to the inline rates array.
noteNoContextual note reminding that these are official reporting rates, not market rates.
errorNoPresent when the call failed. Absent on success.
ratesNoExchange rates for the requested countries/quarter, newest first. Whole in mode=latest — a quarter is a bounded set. In mode=series an inline preview of at most 20 rows; compare its length against retrieved_records to detect the cap, and reach the rest through canvas_id when one is returned.
shownNoRate rows returned inline.
noticeNoGuidance when a requested country matched no records, when the inline series is a preview, when the series was staged as a DataCanvas table, or when the returned rows were published in more than one quarter.
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 rates array holds fewer rows than were retrieved.
as_of_dateNoMost recent quarter-end record_date among the returned rows (YYYY-MM-DD). Not necessarily a date every row shares — check mixed_record_dates.
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, and larger than retrieved_records when paging stopped first.
effective_dateNoEffective date of the as_of_date row (YYYY-MM-DD). Every row carries its own effective_date; this one does not describe the rest.
canvas_expires_atNoISO 8601 expiry for the canvas dataframe.
retrieved_recordsNoRows actually fetched for mode=series across every page, and the row count of the canvas table when one was registered. Never larger than total_records.
mixed_record_datesNoTrue when the retrieved rows were not all published on as_of_date — including rows past the inline preview. Read each row's record_date rather than applying the top-level date to the set.

TDQS

A4.6/5.0
Behavior5/5

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

Annotations already provide readOnlyHint and idempotentHint, but the description goes well beyond by explaining that these are not market rates, not for transaction pricing, published quarterly, and that 'series' results auto-stage when they exceed 500 rows. This significantly enriches the agent's understanding of side effects and constraints.

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 longer than typical but every sentence contributes critical information (purpose, schedule, mode semantics, rate interpretation, warning, staging behavior). It's front-loaded with the primary purpose and ends with actionable follow-up steps. Slightly dense but not wasteful.

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?

The description is comprehensive for a 5-parameter tool with an output schema: it explains both modes, the rate format, the non-market-rate caveat, the staging trigger, and the required follow-up tools. The agent can determine exactly when to use this tool and how to process results without external guesswork.

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?

The input schema already covers all parameters with detailed descriptions (100% coverage), so the baseline is 3. The description adds value by interpreting the mode parameter (latest returns most recent quarter, series returns date range), giving a concrete rate expression example, and clarifying the canvas_id staging condition. This goes beyond simple schema repetition.

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 returns official Treasury exchange rates for ~165 countries, specifies the reporting purpose, and differentiates from sibling tools like treasury_get_debt and treasury_get_interest_rates. The verb 'get' and resource 'exchange rates' are explicit, and the context of federal agency reporting adds precision.

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 explains when to use 'latest' vs 'series' modes and provides specific guidance for handling large series results via DataCanvas staging, including naming the sibling tools to read and query the staged table. It doesn't explicitly contrast with all sibling tools but gives enough context to choose correctly.

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.

TDQS

A4.7/5.0
Disambiguation4/5

The tools are mostly distinct: each specialized getter (debt, exchange rates, interest rates) targets a specific dataset, while the generic query tool and list tool serve discovery and ad-hoc queries. There is some overlap between the generic treasury_query_dataset and the specialized getters, but the descriptions clearly differentiate their intended use (specialized modes vs. raw endpoint queries).

Naming Consistency5/5

All tools follow a consistent treasury_verb_noun pattern with snake_case (e.g., treasury_get_debt, treasury_list_datasets, treasury_dataframe_query). The verbs (get, list, query, describe) are consistent in style and each noun is plural or singular appropriately, making the naming uniform and predictable.

Tool Count5/5

With 7 tools, the server is well-scoped for its purpose of accessing Treasury fiscal data. It offers dedicated tools for common datasets, a generic query tool for flexibility, and DataFrame staging/query utilities, with no redundancy or overwhelming number of tools.

Completeness5/5

The tool surface covers essential workflows: discovering available datasets (list_datasets), querying any endpoint (query_dataset), retrieving common datasets with convenience modes (debt, exchange rates, interest rates), and handling large result sets via DataCanvas staging (describe/query). No obvious gaps exist; even less common datasets are accessible through the generic query tool.