Skip to main content
Glama

fxapi Exchange Rates MCP Server

Historical exchange rates for a time range

getRange

Returns exchange rates for every interval between datetime_start and datetime_end at the requested accuracy. Requires a plan that includes the range endpoint (medium and up). The allowed span and look-back depend on the chosen accuracy:

  • day: not more than 366 days between start and end.

  • hour: not more than 7 days between start and end, and not more than 3 months back.

  • quarter_hour: not more than 24 hours between start and end, and not more than 7 days back.

  • minute: not more than 6 hours between start and end, and not more than 7 days back.

  • week: the daily rate at the end of each week (Sunday), not more than 1830 days between start and end.

  • month: the daily rate at the end of each month, any span back to

For week and month the last point is datetime_end itself when it falls inside a period. Add format=csv for one row per point and currency: datetime,base_currency,currency,value.

orient=currency returns one series per currency instead of one point per datetime (data.EUR is a list of {datetime, value}), shape=compact drops the code/value objects (with orient=currency each point is [datetime, value]), and precision rounds.

Input Schema

NameRequiredDescriptionDefault
typeNoFilter the returned currencies by type.
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`.
orientNo`datetime` (default): one point per datetime. `currency`: one series per currency, keyed by code.
accuracyNoThe interval accuracy of the returned data.
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.
datetime_endYesEnd of the range as an ISO 8601 datetime (e.g. `2021-12-31T23:59:59Z`). Must be after or equal to `datetime_start`.
base_currencyNoThe base currency that all returned values are relative to. Defaults to `USD`.
datetime_startYesStart of the range as an ISO 8601 datetime (e.g. `2021-11-30T23:59:59Z`). Must be before or equal to `datetime_end`.

Schema Changelog

Changes observed during successful MCP inspections.

  1. 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)."
  2. 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"
      +]
  3. Changed3 schema fields changed
    • addedInput schema / properties / orient
      Added value: +{
      +  "description": "`datetime` (default): one point per datetime. `currency`: one series per currency, keyed by code.",
      +  "enum": [
      +    "datetime",
      +    "currency"
      +  ],
      +  "type": "string"
      +}
    • 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"
      +}
  4. First observed

TDQS

A4/5.0
Behavior4/5

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

With only a title annotation, the description carries the full burden and does so well: it discloses subscription gating, hard span/look-back limits per accuracy, the special end-of-period behavior for `week`/`month`, and the shape of returned data. It stops short of describing error behavior when limits are exceeded or any rate limits, which is the remaining gap.

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?

Purpose and dependency are front-loaded, then the accuracy limits are presented as a compact, scannable list where every bullet carries information an agent needs. The closing paragraph on orient/shape/precision leans on material the schema already states, so it is slightly redundant 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?

For a 10-parameter tool with no output schema, the description covers what an agent actually needs: required plan tier, legal value combinations of dates and accuracy, and what the response looks like in JSON, CSV, and currency-oriented forms. Nothing essential to a correct call is left unstated.

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 coverage is 100%, so the baseline is 3. The description does add genuine meaning for `accuracy` by attaching concrete span constraints that the schema's one-line entry lacks, and it restates the interactions among `format`, `orient`, `shape`, and `precision` — but those restatements largely duplicate the schema rather than extend it.

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 description opens with a specific verb and resource ('Returns exchange rates for every interval between `datetime_start` and `datetime_end`'), which immediately separates it from point-in-time siblings like getLatest or getRate. It does not, however, differentiate itself from getHistorical, which plausibly also returns past rates, so an agent must still infer the boundary from the name alone.

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 per-accuracy span and look-back table is essentially a decision guide: it tells the agent when each `accuracy` value is legal, and the plan requirement ('medium and up') flags a precondition before calling. What is missing is any explicit statement of when to prefer this tool over getHistorical, getAverage, or getOhlc.

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