Skip to main content
Glama

fxapi Exchange Rates MCP Server

Historical exchange rates

getHistorical

Returns the exchange rates for a specific date. Historical data is available back to 1999. The date must be at least one day in the past.

Send dates instead of date for up to 31 days in one request: data is then keyed by date and the request costs one request per date (see X-Cost). Takes the same optional representations as /v1/latest (shape, precision, inverse, format=csv).

Input Schema

NameRequiredDescriptionDefault
dateNoDate to retrieve historical rates for (format `YYYY-MM-DD`). Required unless `dates` is sent; not together with `dates`.
typeNoFilter the returned currencies by type.
datesNoUp to 31 dates (format `YYYY-MM-DD`), comma-separated or as `dates[]=`. Each date is answered once, oldest first, and costs one request.
shapeNo`default`: every rate as `{"code": "EUR", "value": 0.918456}`. `compact`: plain values, `"EUR": 0.918456`.
formatNo`json` (default), `csv` or `xlsx`. CSV has a header line and one row per currency (and point in time), values without exponent notation. `xlsx` is the same table as an Excel workbook (one sheet, bold frozen header row, numbers as numbers), sent as a download named after the endpoint, e.g. `latest.xlsx`.
inverseNo`true` adds `inverse` to every rate: the value of one unit of the currency in the base currency (1 / value). Not with `shape=compact`.
precisionNoRound every value to this many decimals (0 to 10). By default values carry up to 10 decimals (10 significant digits below 0.1).
currenciesNoComma-separated list of currency codes to include (e.g. `EUR,USD,CAD`). The array form `currencies[]=EUR&currencies[]=USD` is also accepted. By default all supported currencies are returned.
base_currencyNoThe base currency that all returned values are relative to. Defaults to `USD`.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedInput schema / properties / dates / minItems
      Added value: +1
  2. Changed1 schema field changed
    • changedInput schema / properties / precision / description
      Previous value: -"Round every value to this many decimals (0 to 10). By default values carry up to 10 decimals."New value: +"Round every value to this many decimals (0 to 10). By default values carry up to 10 decimals (10 significant digits below 0.1)."
  3. Changed2 schema fields changed
    • changedInput schema / properties / format / description
      Previous value: -"`json` (default) or `csv`. CSV has a header line and one row per currency (and point in time), values without exponent notation."New value: +"`json` (default), `csv` or `xlsx`. CSV has a header line and one row per currency (and point in time), values without exponent notation. `xlsx` is the same table as an Excel workbook (one sheet, bold frozen header row, numbers as numbers), sent as a download named after the endpoint, e.g. `latest.xlsx`."
    • changedInput schema / properties / format / enum
      Previous value: -[
      -  "json",
      -  "csv"
      -]New value: +[
      +  "json",
      +  "csv",
      +  "xlsx"
      +]
  4. Changed7 schema fields changed
    • changedInput schema / properties / date / description
      Previous value: -"Date to retrieve historical rates for (format `YYYY-MM-DD`)."New value: +"Date to retrieve historical rates for (format `YYYY-MM-DD`). Required unless `dates` is sent; not together with `dates`."
    • addedInput schema / properties / dates
      Added value: +{
      +  "description": "Up to 31 dates (format `YYYY-MM-DD`), comma-separated or as `dates[]=`. Each date is answered once, oldest first, and costs one request.",
      +  "items": {
      +    "type": "string"
      +  },
      +  "maxItems": 31,
      +  "type": "array"
      +}
    • addedInput schema / properties / format
      Added value: +{
      +  "description": "`json` (default) or `csv`. CSV has a header line and one row per currency (and point in time), values without exponent notation.",
      +  "enum": [
      +    "json",
      +    "csv"
      +  ],
      +  "type": "string"
      +}
    • addedInput schema / properties / inverse
      Added value: +{
      +  "description": "`true` adds `inverse` to every rate: the value of one unit of the currency in the base currency (1 / value). Not with `shape=compact`.",
      +  "type": "boolean"
      +}
    • addedInput schema / properties / precision
      Added value: +{
      +  "description": "Round every value to this many decimals (0 to 10). By default values carry up to 10 decimals.",
      +  "type": "integer"
      +}
    • addedInput schema / properties / shape
      Added value: +{
      +  "description": "`default`: every rate as `{\"code\": \"EUR\", \"value\": 0.918456}`. `compact`: plain values, `\"EUR\": 0.918456`.",
      +  "enum": [
      +    "default",
      +    "compact"
      +  ],
      +  "type": "string"
      +}
    • removedInput schema / required
      Removed value: -[
      -  "date"
      -]
  5. First observed

TDQS

A3.8/5.0
Behavior4/5

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

Annotations carry only a title, so the description does the work: it discloses the 1999 data floor, the one-day-past constraint, that multi-date responses are keyed by date, that results are returned oldest first, and that each date costs one request (visible via X-Cost). Auth requirements and error behavior are not covered, keeping it below a 5.

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?

Two tight paragraphs with the core purpose front-loaded and the multi-date/cost caveat immediately after. The parenthetical '(see X-Cost)' and the /v1/latest cross-reference are efficient pointers rather than padding, though the second sentence is dense enough to require a re-read.

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

Completeness4/5

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

For a 9-parameter, zero-required tool with no output schema, the description covers the essential call-shaping concerns: which date parameter to use, how the response is structured in each mode, and the cost implication. It stops short of describing the single-date response envelope (base currency, date key, rates map), which an agent without an output schema might want.

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 baseline is 3, and the description goes beyond it by explaining the response-shape consequence of using `dates` (data keyed by date), the per-date billing cost, and by pointing at `/v1/latest` for the shared shape/precision/inverse/format=csv semantics instead of re-documenting them. The mutual exclusivity of `date`/`dates` is repeated from the schema but the added behavioral framing is genuinely new information.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The first sentence gives a specific verb and resource (returns exchange rates) plus a scope (a specific date), and the second sentence adds the coverage window back to 1999. It does not, however, distinguish itself from the many sibling time-series tools (getRange, getOhlc, getAverage, getFluctuation), so an agent must still infer the boundary cases.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Useful constraints are stated: the date must be at least one day in the past, and `dates` should be sent instead of `date` for up to 31 days in one call. But the guidance is about parameter choice within the tool, not when to pick this tool over siblings like getRange or getLatest; the only sibling reference is '/v1/latest' for shared optional representations, which is about output format rather than tool selection.

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