Skip to main content
Glama
lkcair

yfinance-ai MCP server

by lkcair

get_forex_rate

Read-onlyIdempotent

Fetch current exchange rates for any currency pair, including bid/ask, day range, and recent changes, to support forex analysis and currency conversion tasks.

Instructions

Get foreign exchange (forex) rate for a currency pair.

Args: pair: Currency pair (e.g., 'EURUSD', 'EUR/USD', 'eurusd', 'GBPUSD=X')

Returns: Current exchange rate, bid/ask, day range, and recent changes

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pairYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.9/5.0
Behavior3/5

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

Annotations already declare readOnlyHint, idempotentHint, openWorldHint and destructiveHint=false, so the safety profile is fully covered. The description adds which values come back (rate, bid/ask, day range, recent changes), but says nothing about auth, rate limits, or invalid-pair behavior. With annotations carrying the safety burden, 3 is appropriate.

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?

Args/Returns layout is front-loaded and easy to scan, and every line carries information. Slightly docstring-ish formatting rather than flowing prose, but no wasted sentences.

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?

An output schema exists, so the Returns line is supplementary rather than required, and the annotations cover safety. The one real gap for a marketplace-data lookup — how failures (unknown pair, market closed) surface — is unaddressed, but the core invocation contract is complete.

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

Parameters4/5

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

Schema coverage is 0% and the schema only types 'pair' as a bare string, so the description's format examples ('EURUSD', 'EUR/USD', 'eurusd', 'GBPUSD=X') are genuinely load-bearing — they tell the agent what input shapes are accepted. It stops short of a full spec (no canonical form or error behavior), but it substantially compensates for the empty schema.

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?

Specific verb ('Get') plus precise resource ('foreign exchange (forex) rate for a currency pair'), which cleanly separates it from the price/quote siblings like get_crypto_price, get_commodity_price, and get_stock_price. An agent knows exactly what asset class this serves without opening the schema.

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 unambiguous forex resource implicitly routes the agent here rather than to the equity or crypto tools, so usage is inferable. However, the description names no alternatives and gives no conditions or prerequisites, so anything beyond the obvious case is left to inference.

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