Skip to main content
Glama

exchange-rates-mcp-server

Fx Get Rates

fx_get_rates
Read-onlyIdempotent

Get all available exchange rates for one base currency in a single snapshot. Useful for bulk comparison and seeding downstream tools. Returns a map of quote currency → rate, the actual snapshot date, and whether a historical date was snapped to the prior published date. Optionally filter to a subset of quote currencies via symbols. Listing the base currency itself in symbols is accepted and returns a rate of 1 for it.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "base_currency": "<base_currency>"
    },
    "name": "fx_get_rates"
  }
}

Input Schema

NameRequiredDescriptionDefault
dateNoISO 8601 date (YYYY-MM-DD). Omit for the latest available rate. Frankfurter v1 data starts 1999-01-04. Future dates are not supported.
symbolsNoOptional list of quote currency codes to filter the response. When provided, must contain at least one currency code — omit the field entirely, not an empty array, to return all ~30 supported currencies (the base is not among them). Including base_currency here is valid — it comes back with a rate of 1.
base_currencyYesISO 4217 base currency code (e.g. USD). Call fx_list_currencies to get valid codes.

Output Schema

NameRequiredDescriptionDefault
errorNoPresent when the call failed. Absent on success.
ratesNoMap of quote currency code → exchange rate (units of quote per 1 base).
sourceNoAlways "Frankfurter v1" — the upstream data provider.
rate_dateNoActual date of the rates: the prior published date when none was published for the requested date.
rate_typeNoAlways "Daily rate (Frankfurter v1)" — these are reference rates, not tradeable bid/ask.
date_snappedNoTrue when rate_date differs from the requested date: the requested date was a weekend or holiday, or its daily fix was not yet published. Frankfurter v1 snaps such requests to the prior published date. Always false when date is omitted.
base_currencyNoThe base currency code.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changed
    • changedOutput schema / properties / date_snapped / description
      Previous value: -"True when the API returned a different date than requested — Frankfurter v1 snaps weekend/holiday requests to the prior business day. Always false when date is omitted."New value: +"True when rate_date differs from the requested date: the requested date was a weekend or holiday, or its daily fix was not yet published. Frankfurter v1 snaps such requests to the prior published date. Always false when date is omitted."
    • changedOutput schema / properties / error / properties / data / properties / reason / description
      Previous value: -"Machine-readable failure mode. Declared by this tool: `invalid_date_format`: date is not a real calendar date written as YYYY-MM-DD. `unsupported_currency`: base_currency or an entry in symbols is not available in the current discovery or served historical data. `date_out_of_range`: date is before 1999-01-04 or in the future. `upstream_no_data`: Every requested currency is supported but the Frankfurter v1 published no rates for this date. Other values are possible when a failure originates below the handler."New value: +"Machine-readable failure mode. Declared by this tool: `invalid_date_format`: date is not a real calendar date written as YYYY-MM-DD. `unsupported_currency`: base_currency or an entry in symbols is not available in the current discovery or served historical data. `date_out_of_range`: date is before 1999-01-04 or in the future. `upstream_no_data`: Every requested currency is supported but Frankfurter v1 has no observation for a requested currency on this date. Other values are possible when a failure originates below the handler."
    • changedOutput schema / properties / rate_date / description
      Previous value: -"Actual date of the rates. May differ from requested date on weekends/holidays — daily observations may skip non-publication days; the API silently snaps to the prior business day."New value: +"Actual date of the rates: the prior published date when none was published for the requested date."
  2. Changed7 schema fields changed
    • changedInput schema / properties / date / description
      Previous value: -"ISO 8601 date (YYYY-MM-DD). Omit for the latest available rate. ECB data starts 1999-01-04. Future dates are not supported."New value: +"ISO 8601 date (YYYY-MM-DD). Omit for the latest available rate. Frankfurter v1 data starts 1999-01-04. Future dates are not supported."
    • addedInput schema / properties / date / pattern
      Added value: +"^(?:\\d{4}-\\d{2}-\\d{2}|latest)$"
    • changedOutput schema / properties / date_snapped / description
      Previous value: -"True when the API returned a different date than requested — ECB silently snaps weekend/holiday requests to the prior business day. Always false when date is omitted."New value: +"True when the API returned a different date than requested — Frankfurter v1 snaps weekend/holiday requests to the prior business day. Always false when date is omitted."
    • changedOutput schema / properties / error / properties / data / properties / reason / description
      Previous value: -"Machine-readable failure mode. Declared by this tool: `invalid_date_format`: date is not a real calendar date written as YYYY-MM-DD. `unsupported_currency`: base_currency or an entry in symbols is not in the ECB currency set. `date_out_of_range`: date is before 1999-01-04 or in the future. `upstream_no_data`: Every requested currency is supported but the ECB published no rates for this date. Other values are possible when a failure originates below the handler."New value: +"Machine-readable failure mode. Declared by this tool: `invalid_date_format`: date is not a real calendar date written as YYYY-MM-DD. `unsupported_currency`: base_currency or an entry in symbols is not available in the current discovery or served historical data. `date_out_of_range`: date is before 1999-01-04 or in the future. `upstream_no_data`: Every requested currency is supported but the Frankfurter v1 published no rates for this date. Other values are possible when a failure originates below the handler."
    • changedOutput schema / properties / rate_date / description
      Previous value: -"Actual date of the rates. May differ from requested date on weekends/holidays — ECB publishes business days only; the API silently snaps to the prior business day."New value: +"Actual date of the rates. May differ from requested date on weekends/holidays — daily observations may skip non-publication days; the API silently snaps to the prior business day."
    • changedOutput schema / properties / rate_type / description
      Previous value: -"Always \"ECB reference (mid-market)\" — these are reference rates, not tradeable bid/ask."New value: +"Always \"Daily rate (Frankfurter v1)\" — these are reference rates, not tradeable bid/ask."
    • changedOutput schema / properties / source / description
      Previous value: -"Always \"ECB via Frankfurter\" — the upstream data provider."New value: +"Always \"Frankfurter v1\" — the upstream data provider."
  3. Changed4 schema fields changed
    • changedInput schema / properties / symbols / description
      Previous value: -"Optional list of quote currency codes to filter the response. Omit to return all ~30 supported currencies (the base is not among them). Including base_currency here is valid — it comes back with a rate of 1."New value: +"Optional list of quote currency codes to filter the response. When provided, must contain at least one currency code — omit the field entirely, not an empty array, to return all ~30 supported currencies (the base is not among them). Including base_currency here is valid — it comes back with a rate of 1."
    • addedInput schema / properties / symbols / minItems
      Added value: +1
    • changedOutput schema / anyOf
      Previous value: -[
      -  {
      -    "not": {
      -      "required": [
      -        "error"
      -      ]
      -    },
      -    "required": [
      -      "base_currency",
      -      "rate_date",
      -      "rates",
      -      "rate_type",
      -      "source"
      -    ]
      -  },
      -  {
      -    "required": [
      -      "error"
      -    ]
      -  }
      -]New value: +[
      +  {
      +    "not": {
      +      "required": [
      +        "error"
      +      ]
      +    },
      +    "required": [
      +      "base_currency",
      +      "rate_date",
      +      "rates",
      +      "date_snapped",
      +      "rate_type",
      +      "source"
      +    ]
      +  },
      +  {
      +    "required": [
      +      "error"
      +    ]
      +  }
      +]
    • addedOutput schema / properties / date_snapped
      Added value: +{
      +  "description": "True when the API returned a different date than requested — ECB silently snaps weekend/holiday requests to the prior business day. Always false when date is omitted.",
      +  "type": "boolean"
      +}
  4. Changed6 schema fields changed
    • changedInput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
    • addedInput schema / additionalProperties
      Added value: +false
    • changedOutput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
    • addedOutput schema / anyOf
      Added value: +[
      +  {
      +    "not": {
      +      "required": [
      +        "error"
      +      ]
      +    },
      +    "required": [
      +      "base_currency",
      +      "rate_date",
      +      "rates",
      +      "rate_type",
      +      "source"
      +    ]
      +  },
      +  {
      +    "required": [
      +      "error"
      +    ]
      +  }
      +]
    • addedOutput schema / properties / error
      Added value: +{
      +  "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. Declared by this tool: `invalid_date_format`: date is not a real calendar date written as YYYY-MM-DD. `unsupported_currency`: base_currency or an entry in symbols is not in the ECB currency set. `date_out_of_range`: date is before 1999-01-04 or in the future. `upstream_no_data`: Every requested currency is supported but the ECB published no rates for this date. Other values are possible when a failure originates below the handler.",
      +          "examples": [
      +            "invalid_date_format",
      +            "unsupported_currency",
      +            "date_out_of_range",
      +            "upstream_no_data"
      +          ],
      +          "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"
      +}
    • removedOutput schema / required
      Removed value: -[
      -  "base_currency",
      -  "rate_date",
      -  "rates",
      -  "rate_type",
      -  "source"
      -]
  5. Changed1 schema field changed
    • changedInput schema / properties / symbols / description
      Previous value: -"Optional list of quote currency codes to filter the response. Omit to return all ~30 supported currencies."New value: +"Optional list of quote currency codes to filter the response. Omit to return all ~30 supported currencies (the base is not among them). Including base_currency here is valid — it comes back with a rate of 1."
  6. First observed

TDQS

A3.6/5.0
Behavior3/5

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

Annotations already declare readOnly, idempotent, and openWorld, so the safety profile is covered. The description does add real value beyond them by disclosing return shape (quote currency → rate), the actual snapshot date, and the snap-to-prior-published-date behavior for historical requests. Return-format detail overlaps with the existing output schema, so a 3 is fair.

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?

Front-loaded with the core purpose in the first sentence, followed by use case and return shape. The final sentence about listing the base currency in symbols duplicates schema content and could be cut, but overall the description is tight with no bloat.

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 three-parameter read tool with full schema coverage, annotations, and an output schema, the description covers purpose, use context, and the notable date-snapping edge case. An agent has enough to call it correctly; only explicit sibling routing guidance is absent.

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%, so all three parameters are already fully documented, including the ISO date pattern, 1999-01-04 start bound, and the symbols filter behavior. The description's notes on symbols and base-currency-in-symbols returning 1 mostly restate schema text rather than adding new semantics, so baseline 3 applies.

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?

States a specific verb and resource with explicit scope: 'all available exchange rates for one base currency in a single snapshot.' The phrase 'single snapshot' and 'bulk comparison' implicitly separate it from a single-pair or timeseries lookup, but no sibling tool is named outright, so differentiation relies on inference.

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?

Gives a clear use context ('bulk comparison and seeding downstream tools') and explains the symbols filter path, which tells the agent when this tool fits. It stops short of naming an alternative such as fx_get_rate or fx_get_timeseries and stating the condition that would select them instead.

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.