Skip to main content
Glama

Convert currency

convert_currency
Read-only

Convert an amount between currencies at the OpenExchangeRates rate for a date (the same dated rate find_candidate_transactions matches with). Returns {amount, from, to, converted, rate, ratedate}; ratedate is the day the rate is for (a future date uses today's). Pass target (an amount in the to currency, e.g. a bill's outstanding balance) to also get within_tolerance: whether the converted amount lands within tolerance of it (a fraction, default and maximum 0.03 = the 3% cross-currency matching band). No rate for that date returns {error true, reason no-rate}. READ-ONLY: it converts, never records anything.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
toYesISO currency code to convert into (e.g. ZAR).
dateNoThe date whose rate to use (YYYY-MM-DD). Defaults to today; a future date uses today's rate.
fromYesISO currency code of the amount (e.g. GBP).
amountYesThe amount to convert, in the `from` currency.
targetNoOptional amount in the `to` currency to test the converted amount against (e.g. a bill's outstanding balance).
toleranceNoOptional band for `target`, as a fraction (0.03 = 3%). Must be above 0 and at most 0.03; defaults to 0.03, the cross-currency matching band.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.7/5.0
Behavior5/5

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

Beyond the readOnlyHint annotation, the description explicitly states 'READ-ONLY: it converts, never records anything' and details the exact return fields, future-date handling, and the no-rate error shape. This gives an agent a clear behavioral model without needing to call the tool or inspect external docs. There is no contradiction with the annotations.

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?

The description is a single dense paragraph of roughly 100 words, front-loaded with the core action and rate source before optional arguments and edge cases. Every sentence serves a purpose, and the READ-ONLY note, while echoing the annotation, is a useful reinforcement rather than fluff.

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?

Since there is no output schema, the description takes on the burden of documenting the return object, and it does so explicitly: amount, from, to, converted, rate, ratedate, and optional within_tolerance. It also covers the no-rate error case, tolerance bounds, and the connection to find_candidate_transactions, so an agent has all information needed to call the tool correctly.

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?

The schema already covers 100% of parameters, but the description adds meaningful semantics it does not: target is explained as an amount in the 'to' currency such as a bill's balance, tolerance is tied to the default 3% cross-currency matching band, and within_tolerance behavior is defined. This enriches the parameters beyond the structured 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?

The description opens with 'Convert an amount between currencies at the OpenExchangeRates rate for a date', giving a specific verb, resource, and rate source. It is immediately distinct from sibling tools like find_candidate_transactions and any ambiguity about what action is performed is eliminated. It even specifies the return payload.

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 provides clear usage context: it uses 'the same dated rate find_candidate_transactions matches with' and explains how the target and tolerance parameters are meant for checking bill balances within the 3% cross-currency matching band. It does not explicitly state when not to use the tool or name a direct alternative, but the context is sufficient for an agent to select it for conversion checks.

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.

Resources