# `treasury__treasury_get_interest_rates`

**Get Treasury Interest Rates**

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.

- Server: [US Treasury FiscalData](https://gateway.mcpharbor.dev/docs/servers/treasury) (`dev.mcpharbor.gateway/treasury`)
- Price per call: $0.0001 (100 micro-USD); only tools/call is charged
- Endpoint: `https://gateway.mcpharbor.dev/mcp` or `https://gateway.mcpharbor.dev/mcp/treasury`
- Upstream tool: exposed by the provider; called through this gateway as `treasury__treasury_get_interest_rates`
- Provider terms: <https://fiscaldata.treasury.gov/api-documentation/> (verified 2026-09-19)
- Upstream API documentation: <https://fiscaldata.treasury.gov/api-documentation/>
- Rate limit: 300 requests per minute
- Attribution required: Not stated as required

## Parameters

- `canvas_id` (string, optional): 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 ...
- `end_date` (string, optional): ISO 8601 end date for mode=series. Defaults to today.
- `mode` (string, optional): "latest" returns the most recent month's rates. "series" returns a time range. One of: `latest`, `series`. Default: `latest`.
- `security_type` (string, optional): 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, ...
- `start_date` (string, optional): ISO 8601 start date for mode=series (YYYY-MM-DD, must be end-of-month for meaningful results).

## Example call

Request headers and body:

```http
POST /mcp HTTP/1.1
Host: gateway.mcpharbor.dev
Authorization: Bearer <your gateway API key>
Content-Type: application/json
Accept: application/json, text/event-stream
MCP-Protocol-Version: 2026-07-28
Mcp-Method: tools/call
Mcp-Name: treasury__treasury_get_interest_rates
```

```json
{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "_meta": {
      "io.modelcontextprotocol/clientCapabilities": {},
      "io.modelcontextprotocol/clientInfo": {
        "name": "example-agent",
        "version": "1.0.0"
      },
      "io.modelcontextprotocol/protocolVersion": "2026-07-28"
    },
    "arguments": {
      "canvas_id": "example"
    },
    "name": "treasury__treasury_get_interest_rates"
  }
}
```

A successful response:

```json
{
  "id": 1,
  "jsonrpc": "2.0",
  "result": {
    "_meta": {
      "dev.mcpharbor.gateway/call": {
        "chargedMicroUsd": 100,
        "id": "<the id of this charge>"
      }
    },
    "content": [
      {
        "text": "<whatever the upstream tool returned>",
        "type": "text"
      }
    ],
    "resultType": "complete"
  }
}
```

This call costs $0.0001 (100 micro-USD). Reading this page and listing the tool cost nothing.
The `dev.mcpharbor.gateway/call` record in the result is the receipt for that charge. Each
POST is metered separately, so sending the same call again buys another one: see
[agent.txt](https://gateway.mcpharbor.dev/agent.txt), section 7, before retrying.

## Attribution

This provider requires the attribution below wherever you use results from its tools.
Reproduce it verbatim:

> Not stated as required

## Tool definition

Exactly as `tools/list` returns it (free):

```json
{
  "_meta": {
    "dev.mcpharbor.gateway/pricing": {
      "currency": "USD",
      "pricePerCallMicroUsd": 100
    }
  },
  "annotations": {
    "idempotentHint": true,
    "readOnlyHint": true
  },
  "description": "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.",
  "inputSchema": {
    "$schema": "https://json-schema.org/draft/2020-12/schema",
    "additionalProperties": false,
    "properties": {
      "canvas_id": {
        "description": "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.",
        "type": "string"
      },
      "end_date": {
        "description": "ISO 8601 end date for mode=series. Defaults to today.",
        "type": "string"
      },
      "mode": {
        "default": "latest",
        "description": "\"latest\" returns the most recent month's rates. \"series\" returns a time range.",
        "enum": [
          "latest",
          "series"
        ],
        "type": "string"
      },
      "security_type": {
        "description": "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.",
        "type": "string"
      },
      "start_date": {
        "description": "ISO 8601 start date for mode=series (YYYY-MM-DD, must be end-of-month for meaningful results).",
        "type": "string"
      }
    },
    "type": "object"
  },
  "name": "treasury__treasury_get_interest_rates",
  "outputSchema": {
    "$schema": "https://json-schema.org/draft/2020-12/schema",
    "additionalProperties": false,
    "anyOf": [
      {
        "not": {
          "required": [
            "error"
          ]
        },
        "required": [
          "as_of_date",
          "rates",
          "total_records"
        ]
      },
      {
        "required": [
          "error"
        ]
      }
    ],
    "properties": {
      "as_of_date": {
        "description": "Most recent record date returned (YYYY-MM-DD).",
        "type": "string"
      },
      "canvas_expires_at": {
        "description": "ISO 8601 expiry for the canvas dataframe.",
        "type": "string"
      },
      "canvas_id": {
        "description": "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.",
        "type": "string"
      },
      "cap": {
        "description": "The preview cap applied to the inline series array.",
        "type": "number"
      },
      "error": {
        "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"
      },
      "notice": {
        "description": "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.",
        "type": "string"
      },
      "rates": {
        "description": "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.",
        "items": {
          "additionalProperties": false,
          "description": "One interest rate record.",
          "properties": {
            "avg_interest_rate_pct": {
              "description": "Average interest rate as a percentage string (e.g., \"3.696\"). Not basis points.",
              "type": "string"
            },
            "record_date": {
              "description": "Record date (YYYY-MM-DD).",
              "type": "string"
            },
            "security_desc": {
              "description": "Security description (e.g., Treasury Bills).",
              "type": "string"
            },
            "security_type": {
              "description": "Security type (Marketable, Non-marketable, Interest-bearing Debt).",
              "type": "string"
            }
          },
          "required": [
            "record_date",
            "security_type",
            "security_desc",
            "avg_interest_rate_pct"
          ],
          "type": "object"
        },
        "type": "array"
      },
      "shown": {
        "description": "Series rows returned inline.",
        "type": "number"
      },
      "total_records": {
        "description": "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.",
        "type": "number"
      },
      "truncated": {
        "description": "True when the inline series array holds fewer rows than were retrieved.",
        "type": "boolean"
      }
    },
    "type": "object"
  },
  "title": "Get Treasury Interest Rates"
}
```
