Skip to main content
Glama

exchange-rates-mcp-server

Fx Get Rate

fx_get_rate
Read-onlyIdempotent

Get the exchange rate for a currency pair on a given date (default: latest). Returns the rate, the actual rate date (which may differ from the requested date on weekends/holidays — daily observations may skip non-publication days), and source provenance. Cross-rates are triangulated through EUR automatically. A same-currency pair returns a rate of 1, dated to the same publication day any other pair would report for that date. Use fx_convert_currency when you want the converted amount; use this tool when you only need the rate number.

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.
base_currencyYesISO 4217 base currency code (e.g. USD). Call fx_list_currencies to get valid codes.
quote_currencyYesISO 4217 quote currency code (e.g. EUR). The rate is expressed as "how many quote units per 1 base unit". Call fx_list_currencies to get valid codes.

Output Schema

NameRequiredDescriptionDefault
rateNoExchange rate: units of quote currency per 1 unit of base currency.
errorNoPresent when the call failed. Absent on success.
sourceNoAlways "Frankfurter v1" — the upstream data provider.
rate_dateNoActual date of the rate returned.
rate_typeNoAlways "Daily rate (Frankfurter v1)" — these are reference rates, not tradeable bid/ask.
date_snappedNoTrue when the API returned a different date than requested — Frankfurter v1 snaps weekend/holiday requests to the prior business day.
base_currencyNoThe base currency code.
quote_currencyNoThe quote currency code.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed6 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."New value: +"True when the API returned a different date than requested — Frankfurter v1 snaps weekend/holiday requests to the prior business day."
    • 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 quote_currency is not in the ECB currency set. `date_out_of_range`: date is before 1999-01-04 or in the future. `upstream_no_data`: Both currencies are supported but the ECB published no rate 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 quote_currency 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`: Both currencies are supported but the Frankfurter v1 published no rate for this date. Other values are possible when a failure originates below the handler."
    • 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."
  2. Changed1 schema field changed
    • changedInput schema / properties / quote_currency / description
      Previous value: -"ISO 4217 quote currency code (e.g. EUR). The rate is expressed as \"how many quote units per 1 base unit\"."New value: +"ISO 4217 quote currency code (e.g. EUR). The rate is expressed as \"how many quote units per 1 base unit\". Call fx_list_currencies to get valid codes."
  3. 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",
      +      "quote_currency",
      +      "rate",
      +      "rate_date",
      +      "date_snapped",
      +      "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 quote_currency is not in the ECB currency set. `date_out_of_range`: date is before 1999-01-04 or in the future. `upstream_no_data`: Both currencies are supported but the ECB published no rate 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",
      -  "quote_currency",
      -  "rate",
      -  "rate_date",
      -  "date_snapped",
      -  "rate_type",
      -  "source"
      -]
  4. First observed

TDQS

A4.4/5.0
Behavior5/5

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

Goes well beyond the readOnly/idempotent/openWorld annotations: it discloses that the returned rate date may differ from the requested date on weekends/holidays because non-publication days are skipped, that cross-rates are triangulated through EUR, and that a same-currency pair returns 1 dated to the normal publication day. These are non-obvious behaviors an agent could otherwise misreport to a user.

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 purpose and default, then progressive behavioral detail, then the sibling routing sentence. Slight redundancy in enumerating the return fields (rate, rate date, provenance) when an output schema already exists, but every sentence still carries information.

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 3-parameter read-only lookup with an output schema and full annotation coverage, the description is complete: it covers the default, the date-mismatch behavior, cross-rate derivation, and the identity-pair edge case. Nothing needed to call it correctly or interpret the result 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 effectively 100%, so date format, default-latest behavior, and base/quote directionality are already documented in the schema. The description adds the cross-rate triangulation and identity-pair semantics, but does not extend parameter meaning much past the baseline where the schema does the heavy lifting.

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?

States a specific verb and resource with scope: exchange rate for a currency pair on a given date, defaulting to latest. The final sentence explicitly contrasts it with fx_convert_currency, so an agent can distinguish rate-only lookup from conversion without opening either schema.

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?

Clear routing rule: 'Use fx_convert_currency when you want the converted amount; use this tool when you only need the rate number.' No guidance is given against fx_get_rates (plural) or fx_get_timeseries, which are the other plausible alternatives for rate retrieval, so the when-not coverage is partial.

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.