Skip to main content
Glama

exchange-rates-mcp-server

Fx Convert Currency

fx_convert_currency
Read-onlyIdempotent

Convert an amount between any two currencies at the latest or a historical rate. Returns the converted amount, the rate used, the actual rate date, and whether the date was snapped from a weekend/holiday to the prior business day. Cross-rates are triangulated through EUR automatically.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
dateNoISO 8601 date (YYYY-MM-DD) for a historical rate. Omit for the latest available rate. ECB data starts 1999-01-04. Future dates are not supported.
amountYesAmount in the base currency to convert. Must be greater than zero.
base_currencyYesISO 4217 source currency code (e.g. USD). Call fx_list_currencies to get valid codes.
quote_currencyYesISO 4217 target currency code (e.g. EUR). The amount will be expressed in this currency. Call fx_list_currencies to get valid codes.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
rateNoExchange rate used: units of quote currency per 1 unit of base currency.
errorNoPresent when the call failed. Absent on success.
sourceNoAlways "ECB via Frankfurter" — the upstream data provider.
rate_dateNoActual date of the rate used for conversion.
rate_typeNoAlways "ECB reference (mid-market)" — these are reference rates, not tradeable bid/ask.
base_amountNoThe input amount in the base currency.
date_snappedNoTrue when the API returned a different date than requested — ECB silently snaps weekend/holiday requests to the prior business day.
quote_amountNoThe converted amount in the quote currency, rounded to 6 decimal places.
base_currencyNoSource currency code.
quote_currencyNoTarget currency code.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / properties / quote_currency / description
      Previous value: -"ISO 4217 target currency code (e.g. EUR). The amount will be expressed in this currency."New value: +"ISO 4217 target currency code (e.g. EUR). The amount will be expressed in this currency. Call fx_list_currencies to get valid codes."
  2. 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",
      +      "base_amount",
      +      "quote_amount",
      +      "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",
      -  "base_amount",
      -  "quote_amount",
      -  "rate",
      -  "rate_date",
      -  "date_snapped",
      -  "rate_type",
      -  "source"
      -]
  3. Changed2 schema fields changed
    • changedInput schema / properties / amount / description
      Previous value: -"Amount in the base currency to convert. Must be a positive number."New value: +"Amount in the base currency to convert. Must be greater than zero."
    • addedInput schema / properties / amount / exclusiveMinimum
      Added value: +0
  4. First observed

TDQS

A4.1/5.0
Behavior5/5

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

Annotations already cover the read-only/idempotent safety profile, and the description adds real behavioral context beyond them: the exact return fields, weekend/holiday snapping to the prior business day, and automatic EUR triangulation for cross-rates. That is precisely the kind of non-obvious behavior an agent needs.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Three tight sentences, front-loaded with the core action, then the return shape, then the triangulation caveat. No filler and nothing repeated from the schema.

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?

With annotations covering safety and an output schema covering the response, the description only needs to supply the surprising behaviors — snapping and triangulation — which it does. Nothing needed to call it correctly 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 100%, so the schema already documents date handling, ISO 4217 codes, and the amount constraint; the description adds no new parameter detail. Baseline 3 applies when the schema does the heavy lifting.

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 ('Convert an amount between any two currencies') with the rate-source scope (latest or historical). It is clearly distinct from the rate-fetching siblings (fx_get_rate, fx_get_rates, fx_get_timeseries), though it never names them, so the differentiation is implied rather than explicit.

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?

The description signals the two modes (omit date for latest, supply date for historical) but gives no explicit guidance on when to reach for this tool instead of calling fx_get_rate and multiplying, nor any prerequisites or exclusions. Usage is inferable but not stated.

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.