Skip to main content
Glama

Currency rate history

cb_rate_history
Read-onlyIdempotent

Fetch official CBI exchange rate history for one currency over a date range, including total change, to analyze trends and compare past rates.

Instructions

Get the official CBI rate of one currency over time, oldest first, with the total change.

Without dates it returns the last 7 published days (one fast call). With from_date it samples the archive every step_days up to to_date (default: today), at most 20 points ending at to_date, so use step_days 7 for months or 30 for years. Days without a published rate are skipped. Rates are rials per currency unit; see per_units in cb_exchange_rates. Use cb_exchange_rates to see every currency on one day.

Input Schema

NameRequiredDescriptionDefault
to_dateNoDate as 1404/01/01 (Jalali, year below 1700) or 2025-03-21 (Gregorian). Default: latest.
currencyYesISO code, e.g. USD, EUR, AED, TRY.
from_dateNoDate as 1404/01/01 (Jalali, year below 1700) or 2025-03-21 (Gregorian). Default: latest.
step_daysNoDays between points when from_date is given (1-90).

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.8/5.0
Behavior5/5

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

Goes well beyond the readOnly/idempotent annotations: discloses ordering (oldest first), the computed total change, a 20-point sampling cap ending at to_date, that days without a published rate are skipped, and that rates are rials per currency unit (pointing to per_units in the sibling). That is exactly the behavioral context annotations cannot carry.

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-loads purpose, then the two behavioral branches, then the sibling pointer and units note – every sentence carries information. The middle sentence is dense and run-on, but nothing is wasted.

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 no output schema, the description still tells the agent what comes back (rate series plus total change, in rials per unit), how many points, and how gaps are handled. All four parameters and both operating modes are accounted for.

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 already 100%, but the description adds actionable meaning: step_days 7 for months, 30 for years, capped at 20 points ending at to_date, and to_date defaulting to today. It doesn't restate the Jalali/Gregorian format rules, which the schema handles.

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 ("Get the official CBI rate of one currency over time") plus the output shape (oldest first, with total change). It explicitly distinguishes itself from the sibling cb_exchange_rates, which covers all currencies on a single day.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Gives explicit when-to-use branches: without dates → fast 7-day snapshot; with from_date → sampled archive series. It names the alternative (cb_exchange_rates) and the condition that selects it ("every currency on one day").

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