Skip to main content
Glama

Get official exchange rate (ECB, Banxico FIX)

get_fx_rate

Use this when you need an official exchange rate for a date for invoicing, reports or reconciliation: European Central Bank euro reference rates (30+ currencies incl. USD, GBP, JPY, CHF, MXN, BRL, CNY, INR; cross rates derived via EUR; history since 1999) or, with params.source "banxico", the Banco de Mexico FIX USD/MXN rate published in the DOF (requires a BANXICO_TOKEN on the server; otherwise SOURCE_UNAVAILABLE without charge). Weekends and holidays return the last published rate before the date (rateDate) unless exactDate is true. Optional amount returns the converted value. Unknown currencies return UNSUPPORTED_COUNTRY without charge.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "get_fx_rate"
  }
}

Input Schema

NameRequiredDescriptionDefault
toNoQuote currency, ISO 4217, e.g. "MXN", "GBP", "JPY".
dateNoRate date YYYY-MM-DD (e.g. "2026-10-15"). Omit for the latest published rate. Weekends/holidays use the last published rate before that date unless params.exactDate is true.
fromNoBase currency, ISO 4217, e.g. "USD", "EUR", "MXN".
itemsNoBatch mode: up to 500 items, each with the same fields as a single call. Omit when validating a single value through the top-level fields.
amountNoOptional amount in `from` currency to convert; the result includes `converted` in `to` currency.
sourceNo"ecb" (default): European Central Bank euro reference rates, 30+ currencies, cross rates via EUR. "banxico": Banco de Mexico FIX USD/MXN (series SF43718, the rate published in the DOF); USD/MXN pairs only, requires BANXICO_TOKEN on the server.ecb
exactDateNoIf true, only the exact date is accepted (no rate on weekends/holidays -> found:false). Default false: last published rate on or before the date.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.3/5.0
Behavior5/5

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

With no annotations, the description carries the full behavioral burden and does so well: it discloses weekend/holiday fallback behavior, the exactDate exception, the BANXICO_TOKEN requirement, SOURCE_UNAVAILABLE and UNSUPPORTED_COUNTRY error codes, and no-charge behavior for those errors. It also mentions historical coverage since 1999 and derived cross rates.

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?

The description is front-loaded with a clear "Use this when" statement and every sentence carries operational information. It is dense and could be split into shorter source-specific and behavior-specific sentences for faster scanning, but it is not padded.

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 complex, seven-parameter tool with no output schema, the description covers source selection, fallback rules, token requirements, conversion, and error conditions. It does not fully describe the response shape beyond mentioning rateDate and converted, which keeps it just below a 5.

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 all seven parameters, including source enum semantics, date formatting, and amount conversion. The description adds cross-parameter context such as Banxico being USD/MXN only, but most of this is repeated from the schema rather than adding new meaning.

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?

The description states a specific verb and resource: an official exchange rate for a date, with two clearly named source modes (ECB euro reference rates and Banxico FIX USD/MXN). It enumerates supported currencies, cross-rate derivation, and the conversion option, which makes the tool's purpose distinct from the sibling validation/lookup tools.

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?

It gives clear intended usage scenarios (invoicing, reports, reconciliation) and explains how to choose between the ECB and Banxico sources. It does not explicitly say when not to use the tool or name a sibling alternative, which keeps it at 4 rather than 5.

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.