Skip to main content
Glama

Convert using representative rates

convert_currency

Convert an amount between ILS and supported currencies, or between two foreign currencies via ILS, using Bank of Israel representative rates with optional date fallback to the previous business day.

Instructions

Convert an amount between ILS and any supported currency, or between two foreign currencies via ILS (cross rate), using Bank of Israel representative rates. Optional date uses the rate on that day or the previous business day. Returns the result (4 decimals), the cross rate and the rate date used for each leg.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "amount": "<amount>",
      "from": "<from>",
      "to": "<to>"
    },
    "name": "convert_currency"
  }
}

Input Schema

NameRequiredDescriptionDefault
toYesTarget currency: ILS (or NIS/₪) or a supported code
dateNoOptional date, YYYY-MM-DD. Defaults to the latest published rates
fromYesSource currency: ILS (or NIS/₪) or a supported code
amountYesAmount to convert, e.g. 250

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.2/5.0
Behavior4/5

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

With no annotations, the description carries the burden and largely succeeds: it discloses the cross-rate mechanism through ILS, the business-day fallback for dates, output precision (4 decimals), and what each returned leg reports (cross rate and rate date). It stops short of stating error behavior for unsupported currency codes or negative amounts.

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 tight sentences, front-loaded with the core capability and conversion paths, then optional-date behavior, then return shape. No filler and nothing redundant.

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?

There is no output schema, so the description usefully specifies the return contents (result to 4 decimals, cross rate, rate date per leg). For a four-parameter, annotation-free tool the only remaining gap is failure modes for unsupported currency codes and amount constraints.

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%, so the baseline is 3, but the description adds genuine meaning beyond it: the date parameter's previous-business-day fallback and per-leg rate date, and the fact that a non-ILS pair is resolved via an ILS cross rate rather than a direct quote.

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 (convert) and resource (currency amount) plus the exact supported paths: ILS-to-any, any-to-ILS, and foreign-to-foreign via ILS cross rate, using Bank of Israel representative rates. This naturally separates it from rate-lookup siblings like get_rate and get_latest_rates without needing to name them.

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 date rule ('uses the rate on that day or the previous business day') gives useful context for the optional parameter, but there is no explicit when-to-use-this-vs-alternatives guidance. An agent must infer that this tool is for computed conversions while siblings merely return rates.

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