Skip to main content
Glama

treasury-fiscaldata-mcp-server

Server Details

Query US Treasury national debt, interest rates, exchange rates, and fiscal datasets via MCP.

If you are the author of this connector, you can claim ownership with GitHub, an HTTP challenge, or a DNS record. Claimed connector authors can inspect health checks, view analytics, and manage their listing.
Status
Healthy
Last Tested
Transport
Streamable HTTP
URL
Repository
cyanheads/treasury-fiscaldata-mcp-server
GitHub Stars
2
Server Listing
@cyanheads/treasury-fiscaldata-mcp-server
Tool DescriptionsA

Average 4.7/5 across 7 of 7 tools scored.

Server CoherenceA
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.

Available Tools

7 tools
treasury_dataframe_describeDescribe Treasury DataframesA
Read-onlyIdempotent
Inspect

List DataCanvas dataframes materialized by treasury_query_dataset, treasury_get_debt, treasury_get_interest_rates, and treasury_get_exchange_rates. Each entry surfaces source tool, query parameters, creation/expiry timestamps, row count, and column schema. Use this tool before treasury_dataframe_query to discover table names and column types. Requires CANVAS_PROVIDER_TYPE=duckdb.

ParametersJSON Schema
NameRequiredDescriptionDefault
nameNoOptional dataframe table name (df_XXXXX_XXXXX) to describe a single dataframe. Omit to list all active dataframes.

Output Schema

ParametersJSON Schema
NameRequiredDescription
errorNoPresent when the call failed. Absent on success.
dataframesNoActive dataframes for this tenant, newest first. Empty when none are registered.
Behavior4/5

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

Annotations already declare readOnlyHint=true and idempotentHint=true, so the safety profile is covered. The description adds valuable behavioral context: what each entry surfaces (source tool, query parameters, timestamps, row count, column schema) and a prerequisite (CANVAS_PROVIDER_TYPE=duckdb). This goes beyond the annotations and enriches the agent's understanding of the tool's behavior without contradiction.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Four tight sentences, each earning its place: the action/resource, the entry contents, the usage directive, and the environment prerequisite. The critical usage guidance is front-loaded, and there is no redundant or filler language.

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?

For a listing/discovery tool with an optional parameter and an existing output schema, the description covers all operational essentials: what it lists, how to narrow to a single dataframe, the metadata available, the correct usage sequence, and the required environment. Nothing an agent needs to invoke it correctly is missing.

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?

The input schema has 100% schema description coverage, fully documenting the optional 'name' parameter with its format (df_XXXXX_XXXXX) and behavior (describe single vs. list all). The description adds no extra semantic beyond what the schema already states, so the baseline of 3 is appropriate.

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 uses a specific verb ('List') and resource ('DataCanvas dataframes') and ties them to the exact source tools that materialize them. It also differentiates from the sibling tool treasury_dataframe_query by stating its intended role as a discovery step, making the purpose unmistakable.

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?

Explicitly states when to use: 'Use this tool before treasury_dataframe_query to discover table names and column types.' It implies the alternative (treasury_dataframe_query) and provides a clear sequencing directive, leaving no ambiguity about its place in the workflow.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

treasury_dataframe_queryQuery Treasury DataframesA
Read-onlyIdempotent
Inspect

Run a single-statement SELECT against DataCanvas dataframes registered by treasury_query_dataset, treasury_get_debt, treasury_get_interest_rates, and treasury_get_exchange_rates. Read-only: writes, DDL, DROP, COPY, PRAGMA, ATTACH, and external-file table functions are rejected. System catalogs (information_schema, pg_catalog, sqlite_master, duckdb_*) are denied at the bridge layer. All Treasury dataframe columns are VARCHAR — CAST to DECIMAL or DATE for arithmetic and date comparisons. Use treasury_dataframe_describe to list available table names and column schemas before querying.

ParametersJSON Schema
NameRequiredDescriptionDefault
sqlYesSingle-statement SELECT against df_<id> tables. All values in Treasury dataframes are VARCHAR (strings) per the API contract — CAST to DECIMAL or DATE for arithmetic and date comparisons. Example: SELECT record_date, CAST(tot_pub_debt_out_amt AS DECIMAL) AS debt FROM df_xxxxx ORDER BY record_date DESC LIMIT 10.
previewNoRows in the immediate response. Defaults to row_limit and may not exceed it. Set lower when using register_as.
row_limitNoHard cap on rows the query may produce. Default 1000, max 10000. A query matching more rows than this stops at the cap and row_count_capped comes back true — raise it, or use register_as to materialize the whole result.
register_asNoPersist the result as a new dataframe under this exact name, to chain analyses. The name is used verbatim — any name works, and a df_ prefix keeps it consistent with the tables the data tools mint. Echoed back in registered_as.

Output Schema

ParametersJSON Schema
NameRequiredDescription
capNoThe row cap that was applied — preview when supplied, otherwise row_limit.
rowsNoMaterialized rows, bounded by preview / row_limit.
errorNoPresent when the call failed. Absent on success.
shownNoNumber of rows returned in this response.
noticeNoGuidance when the query returned no rows, or when results were capped by preview or row_limit.
columnsNoColumn names in projection order.
row_countNoRows the query produced, up to row_limit. Exceeds rows.length when preview returned fewer. Read with row_count_capped: when that is true this number is row_limit itself, and the size of the full result is not in this response.
truncatedNoTrue when the returned rows were capped below the full result set.
expires_atNoISO 8601 expiry timestamp for the newly registered dataframe, when applicable.
registered_asNoSet when register_as was supplied and the new dataframe was materialized.
row_count_cappedNoTrue when the query matched more rows than row_limit, so row_count is that cap rather than a total. False means row_count is exact — including when it happens to equal row_limit.
Behavior5/5

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

Annotations already declare readOnlyHint=true and idempotentHint=true. The description goes further by revealing that all columns are VARCHAR (requiring CAST), that system catalogs are denied at the bridge layer, and that row_count_capped can be true when exceeding row_limit. This adds behavioral context beyond the annotations, such as the VARCHAR contract and query cap behavior, making the tool's execution semantics clear.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is three sentences, each carrying weight: the first defines the action and scope, the second lists restrictions, and the third gives typing guidance and recommends the describe tool. It is front-loaded with the core purpose, then constraints, then usage tip. No filler; every sentence earns its place. This is optimally concise for the information conveyed.

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 (SQL execution with restrictions, multiple parameters, and a need for schema discovery), the description covers all essential aspects: what it does, safety constraints, VARCHAR caveat, how to discover available tables, and real-world usage via an example. The output schema exists, so return values are documented elsewhere. The description leaves no critical gaps for an agent to call the tool correctly and interpret results (e.g., casting, row caps).

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 description coverage is 100%, so the schema already documents all four parameters. The description adds value by reinforcing the VARCHAR casting requirement and providing an example SQL statement that demonstrates the CAST pattern. While the description repeats some schema details (e.g., row_limit cap), it enhances understanding of how parameters interact (preview vs. row_limit vs. register_as) and offers a concrete usage example. This is above the baseline of 3 because it adds context that helps avoid misuse.

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 identifies the tool's action: 'Run a single-statement SELECT against DataCanvas dataframes'. It names the specific registration tools (treasury_query_dataset, treasury_get_debt, etc.) and explicitly distinguishes from treasury_dataframe_describe by telling users to call that tool for table listing. The read-only constraint and denial of DDL/DROP/etc. further pin down the scope, leaving no ambiguity about what this tool does and what it is not.

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?

The description provides explicit usage direction: 'Use treasury_dataframe_describe to list available table names and column schemas before querying.' It also explains when to avoid the tool (writes/DDL are rejected) and gives practical tips like casting VARCHAR to DECIMAL/DATE for arithmetic and date comparisons. This is clear, actionable guidance that helps an agent decide when to use this tool and how to use it correctly.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

treasury_get_debtGet National DebtA
Read-onlyIdempotent
Inspect

Fetch national debt (Debt to the Penny) — total public debt outstanding broken into publicly-held debt and intragovernmental holdings. Three modes: "latest" returns the most recent business day's record; "date" returns the record for a specific date (must be a business day — the API only records debt on days markets are open); "series" returns a date range, staging the full 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. Records go back to 1993-04-01.

ParametersJSON Schema
NameRequiredDescriptionDefault
dateNoISO 8601 date (YYYY-MM-DD) for mode=date. Must be a business day; the API only records debt on days the market is open.
modeNo"latest" returns the most recent day's record. "date" returns the record for a specific date. "series" returns a date range — use with start_date and end_date.latest
end_dateNoISO 8601 end date for mode=series (inclusive). 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 the range matches more than 500 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 (inclusive). Fiscal Data has daily debt records back to 1993-04-01.

Output Schema

ParametersJSON Schema
NameRequiredDescription
capNoThe preview cap applied to the inline series array.
errorNoPresent when the call failed. Absent on success.
shownNoSeries rows returned inline.
noticeNoGuidance when the inline series is a preview, when the series was staged as a DataCanvas table, or when paging stopped before the full matched set.
seriesNoInline preview of the mode=series records — at most 20 rows, newest first. Compare series.length against retrieved_records to detect the cap; the full retrieved set is reachable through canvas_id when one is returned.
canvas_idNoDuckDB table name (df_XXXXX_XXXXX) holding the full retrieved 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.
total_debtNoTotal public debt outstanding in USD, as a plain decimal string — no separators, no currency symbol, two decimal places. Convert as needed.
record_dateNoDate of this debt record (YYYY-MM-DD). For series mode, the most recent date.
total_recordsNoRecords matching the date range upstream. Exceeds retrieved_records when the match is larger than the series row bound.
debt_held_publicNoDebt held by the public (external creditors, Fed, foreign governments) in USD.
canvas_expires_atNoISO 8601 expiry for the canvas dataframe.
retrieved_recordsNoRecords 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.
intragovernmental_holdingsNoIntragovernmental holdings (debt owed to federal trust funds, Social Security, etc.) in USD.
Behavior5/5

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

Beyond the annotations (readOnlyHint=true, idempotentHint=true), the description discloses meaningful behavioral details: the automatic staging of large series results into DataCanvas tables, the requirement for CANVAS_PROVIDER_TYPE=duckdb, the server-side table naming, and the fact that only business days are recorded. None of these contradict the annotations, and they substantially enrich 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 long but every clause earns its place given the tool's complexity. It front-loads the core purpose and mode summary before diving into staging details, and it uses clear punctuation to separate ideas. The only minor quibble is that the staging explanation could be tightened, but it remains tightly structured and not verbose.

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?

With an output schema available, the description doesn't need to cover return values. It provides all necessary context for correct invocation: mode semantics, date constraints, default behavior for missing start/end dates, automatic staging rules, and pointers to related tools. An agent can confidently call this tool without additional information.

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 the schema provides 100% parameter coverage, the description adds significant operational meaning: it explains the interplay of mode with start_date/end_date, clarifies that canvas_id only requests staging ('the server picks the table name'), and highlights the default for end_date and the historical depth (1993-04-01). This goes well beyond the schema's individual field descriptions.

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-resource pair ('Fetch national debt') and immediately differentiates the tool from siblings by naming the exact data source ('Debt to the Penny') and the breakdown into publicly-held debt and intragovernmental holdings. It also enumerates three distinct modes, making the tool's purpose unambiguous and distinct from other treasury tools.

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?

The description gives explicit, actionable guidance for each mode: 'latest' for the most recent business day, 'date' for a specific business day, and 'series' for a range. It also explains when to use the DataCanvas staging (canvas_id or >500 rows) and routes the agent to treasury_dataframe_describe and treasury_dataframe_query for further analysis. It even notes the business-day constraint and date range origin, leaving no ambiguity about when the tool is appropriate.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

treasury_get_exchange_ratesGet Treasury Exchange RatesA
Read-onlyIdempotent
Inspect

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.

ParametersJSON 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

ParametersJSON Schema
NameRequiredDescription
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.
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.

treasury_get_interest_ratesGet Treasury Interest RatesA
Read-onlyIdempotent
Inspect

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.

ParametersJSON 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

ParametersJSON Schema
NameRequiredDescription
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.
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.

treasury_list_datasetsList Treasury Fiscal Data DatasetsA
Read-onlyIdempotent
Inspect

Browse the curated catalog of US Treasury Fiscal Data API endpoints. Returns endpoint paths, field names, descriptions, and update cadence for each dataset. Use this tool before treasury_query_dataset to discover the correct endpoint path and field names — a typo in either causes a 400 error from the API. The catalog is a curated subset of the full API — pass any endpoint path directly to treasury_query_dataset to query datasets not listed here. The catalog covers debt, interest rates, exchange rates, revenue/spending, savings bonds, and securities datasets.

ParametersJSON Schema
NameRequiredDescriptionDefault
searchNoKeyword filter against dataset name and description (case-insensitive substring match). Useful for narrowing results when the category is uncertain.
categoryNoFilter by category. Omit to list all datasets. Options: debt, interest_rates, exchange_rates, revenue_spending, savings_bonds, securities, other.

Output Schema

ParametersJSON Schema
NameRequiredDescription
errorNoPresent when the call failed. Absent on success.
totalNoTotal matching datasets.
datasetsNoMatching datasets.
Behavior4/5

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

Annotations already declare readOnlyHint=true and idempotentHint=true, so the safety profile is covered without description help. The description adds meaningful context beyond that: the catalog is a curated subset (so omission is expected behavior, not a bug), and the 400-error failure mode from upstream. It does not contradict the annotations.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Four sentences, each earning its place: purpose and return content, then usage guidance, then the curated-subset caveat. Front-loaded with the most important information and zero filler or repetition of the schema/annotations.

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 tool is simple (2 optional params, 0 required, both fully documented) and has an output schema, so return values need no elaboration. The description covers what it returns, when to use it, the important incompleteness caveat, and failure behavior — nothing an agent needs to call it correctly is missing.

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 description coverage is 100% — both 'search' (case-insensitive substring match) and 'category' (enumerated options, omit to list all) are fully documented in the schema. The description adds no parameter-specific detail beyond the schema, so it rests at the baseline 3 rather than compensating for any coverage gap.

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?

Uses a specific verb ('Browse') with a clear resource ('curated catalog of US Treasury Fiscal Data API endpoints') and details the return content: endpoint paths, field names, descriptions, and update cadence. It explicitly differentiates itself from treasury_query_dataset as the listing vs. querying counterpart, so an agent can distinguish it from all six siblings without opening schemas.

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?

States explicitly to use this tool before treasury_query_dataset to discover correct endpoint paths and field names, warning that a typo in either causes a 400 error. It also gives a when-not condition: since the catalog is curated/subset, pass endpoint paths directly to treasury_query_dataset for unlisted datasets. Both the primary use and the alternative path are spelled out.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

treasury_query_datasetQuery Treasury Fiscal Data DatasetA
Read-onlyIdempotent
Inspect

Query any Treasury Fiscal Data endpoint by path, field list, filters, sort, and page. Call treasury_list_datasets first to get the correct endpoint path and exact field names — a typo in either causes a 400. Filter syntax: each condition is { field, operator, value } where operator is eq/gt/gte/lt/lte/in (e.g., record_date:gte:2024-01-01). Multiple conditions are ANDed together. All response values are strings per the API contract, including numbers and dates; "null" (string) means no value. Supply canvas_id to stage the page result as a DataCanvas table — read its column schema with treasury_dataframe_describe, then run SQL over it with treasury_dataframe_query (requires CANVAS_PROVIDER_TYPE=duckdb on the server).

ParametersJSON Schema
NameRequiredDescriptionDefault
sortNoSort expression: field name optionally prefixed with "-" for descending (e.g., "-record_date" for newest-first).
fieldsNoFields to return. Omit to return all fields. Specify field names exactly as listed by treasury_list_datasets — a typo causes a 400.
filtersNoFilter conditions (ANDed together). Multiple filters on different fields are combined in one filter= parameter.
endpointYesEndpoint path returned by treasury_list_datasets (e.g., "/v2/accounting/od/debt_to_penny"). Include the leading slash.
canvas_idNoSet any non-empty value to stage this page as a DataCanvas table for SQL analysis — the value only requests staging; the server picks the table name. The assigned name (df_XXXXX_XXXXX) comes back in the output canvas_id; pass it to treasury_dataframe_describe, then treasury_dataframe_query. Omit to receive results inline only. Requires CANVAS_PROVIDER_TYPE=duckdb on the server.
page_sizeNoRows per page. Default 100. Raise to 10000 to minimize round trips for small datasets. For large time-series pulls, use canvas_id with treasury_dataframe_query instead.
page_numberNoPage to fetch (1-indexed). Check total_pages in the response to know if more pages exist.

Output Schema

ParametersJSON Schema
NameRequiredDescription
dataNoRows returned. All values are strings per API contract — including numeric and date fields. Convert in the calling context. Null values appear as the string "null".
errorNoPresent when the call failed. Absent on success.
noticeNoGuidance when results are empty, a field typo is suspected, the endpoint was not found in the catalog, or staging was requested.
endpointNoEndpoint that was queried.
canvas_idNoDuckDB table name (df_XXXXX_XXXXX) holding this page. 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.
page_sizeNoRows per page.
totalCountNoTotal rows matching the query across all pages — discloses that this page is a subset.
page_numberNoCurrent page (1-indexed).
total_countNoTotal rows matching the query (across all pages).
total_pagesNoTotal pages at the current page_size.
field_labelsNoHuman-readable label for each returned field.
applied_filtersNoFilter expression sent to the API, for verification.
canvas_expires_atNoISO 8601 expiry for the canvas dataframe.
Behavior5/5

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

Annotations already mark readOnlyHint and idempotentHint, so the description needn't repeat safety. It goes beyond by revealing that 'All response values are strings per the API contract, including numbers and dates; "null" (string) means no value,' a crucial behavioral detail. It also discloses a 400 on typos and the CANVAS_PROVIDER_TYPE=duckdb prerequisite, enriching the agent's mental model.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Though long, every sentence serves a purpose: core function, prerequisite, syntax, response behavior, and workflow. It is front-loaded with the primary action and dependency, then details. No fluff or repetition of schema defaults; structure is logical and scannable.

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 (7 parameters, multiple modes), the description covers endpoint discovery, field precision, filter grammar, sorting, pagination via page_number/total_pages, and the canvas staging path. The output schema handles return structure, so nothing an agent needs to call correctly is missing; the required duckdb context and string-typed responses are supplied.

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?

Schema coverage is 100% so baseline is 3, but the description elevates it by explaining the filter syntax as '{ field, operator, value }' with operator enum and an example ('record_date:gte:2024-01-01'), stating conditions are ANDed. It also clarifies canvas_id's staging role and the flow to treasury_dataframe_describe/query, which the schema alone does not convey, adding genuine semantic value.

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 opens with 'Query any Treasury Fiscal Data endpoint by path, field list, filters, sort, and page,' clearly stating a specific action (query) on a defined resource (Treasury Fiscal Data endpoints) with explicit scope. It differentiates from siblings by naming treasury_list_datasets for endpoint discovery and treasury_dataframe_describe/query for downstream data canvas operations, leaving no ambiguity about what this tool is for.

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?

Explicitly instructs 'Call treasury_list_datasets first to get the correct endpoint path and exact field names — a typo in either causes a 400,' giving a hard dependency. It also advises on large pulls to 'use canvas_id with treasury_dataframe_query instead,' and explains the duckdb server requirement, so the agent knows when to use this tool versus alternatives and how to chain it.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Frequently Asked Questions

Discussions

No comments yet. Be the first to start the discussion!

Related MCP Servers

View all MCP Servers

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.