Skip to main content
Glama

get_fx_rate

Retrieve historical foreign exchange rates from a local cache, automatically falling back to the most recent rate within a configurable lookback period to handle weekends and holidays.

Instructions

Look up the historical FX rate for a date and currency from the local cache (foreign per 1 USD). USD always returns 1.0. Falls back to the most recent rate within lookback_days (handles weekends/holidays). Returns null if no rate found in the lookback window. Run sync_fx_rates first to populate the cache.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
dateYesYYYY-MM-DD
currencyYesCurrency code: USD/KRW/JPY/EUR/CNY/GBP
lookback_daysNoDays to look back if exact date not cached
Behavior4/5

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

No annotations are provided, so the description carries the full burden. It discloses read-only behavior (cache lookup), fallback logic, and return of null. It does not explicitly state it is non-destructive, but the description implies no side effects.

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 concise sentences, no redundancy. The main action and key behaviors are front-loaded, making it easy for an agent to quickly understand.

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?

No output schema exists, so the description explains the return value (1.0 for USD, null if not found) adequately. It covers all critical behaviors and prerequisites. Could briefly mention the output format (decimal number) but is sufficient for an agent to use correctly.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The schema has 100% description coverage for all three parameters. The description adds extra context: date is historical, currency codes listed, and lookback_days handles weekends/holidays, which goes beyond the schema's basic descriptions.

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 clearly states the tool looks up historical FX rates from cache, specifies behavior for USD (always 1.0), and fallback logic. It distinguishes itself from siblings like sync_fx_rates (cache population) and show_fx_history (likely multiple rates).

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 description advises to run sync_fx_rates first to populate cache and explains fallback behavior. It implicitly guides when to use this tool (single rate lookup) versus historical alternatives, but does not explicitly exclude itself from other use cases.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/evan-moon/firma'

If you have feedback or need assistance with the MCP directory API, please join our Discord server