Skip to main content
Glama

Convert Currency

convert_currency

Convert any amount between currencies using live exchange rates. Specify base and optional target codes to get converted values and unit rates.

Instructions

Fetch live exchange rates and convert an amount from one currency to others.

Returns a dict with the base currency, the amount converted, and a mapping of each target currency code to its converted value and unit exchange rate (e.g. {"base": "USD", "amount": 100, "results": {"EUR": {"rate": 0.92, "value": 92.0}}}).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
toNoTarget currency codes as a comma-separated string; omit or leave empty to return rates for all available currencies. Example: "EUR,GBP". Default: None (all rates).
baseNoBase currency code as a 3-letter ISO 4217 string. Example: "USD". Default: "USD".USD
amountNoAmount of the base currency to convert, as a number (int or float). Example: 100. Default: 1.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
dataNo
countNo
errorsNo
scraperNo
source_urlsNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv1.4.6
    • changedInput schema / properties / base / description
      Previous value: -"Base currency code as a 3-letter ISO 4217 string. Example: \"USD\". No default (required)."New value: +"Base currency code as a 3-letter ISO 4217 string. Example: \"USD\". Default: \"USD\"."
    • changedInput schema / properties / to / description
      Previous value: -"Target currency codes as a comma-separated string; omit or leave empty to return rates for all available currencies. Example: \"EUR,GBP\". Default: \"\" (all rates)."New value: +"Target currency codes as a comma-separated string; omit or leave empty to return rates for all available currencies. Example: \"EUR,GBP\". Default: None (all rates)."
  2. Changed3 schema fields changed
    • changedInput schema / properties / amount / description
      Previous value: -"Amount of base currency to convert (default 1)."New value: +"Amount of the base currency to convert, as a number (int or float). Example: 100. Default: 1."
    • changedInput schema / properties / base / description
      Previous value: -"Base currency code, e.g. \"USD\"."New value: +"Base currency code as a 3-letter ISO 4217 string. Example: \"USD\". No default (required)."
    • changedInput schema / properties / to / description
      Previous value: -"Comma-separated target codes (e.g. \"EUR,GBP\"). Omit for all rates."New value: +"Target currency codes as a comma-separated string; omit or leave empty to return rates for all available currencies. Example: \"EUR,GBP\". Default: \"\" (all rates)."
  3. Changed20 schema fields changedv1.3.3
    • addedInput schema / additionalProperties
      Added value: +false
    • addedInput schema / properties / amount / description
      Added value: +"Amount of base currency to convert (default 1)."
    • removedInput schema / properties / amount / title
      Removed value: -"Amount"
    • addedInput schema / properties / base / description
      Added value: +"Base currency code, e.g. \"USD\"."
    • removedInput schema / properties / base / title
      Removed value: -"Base"
    • addedInput schema / properties / to / description
      Added value: +"Comma-separated target codes (e.g. \"EUR,GBP\"). Omit for all rates."
    • removedInput schema / properties / to / title
      Removed value: -"To"
    • removedInput schema / title
      Removed value: -"convert_currencyArguments"
    • removedOutput schema / $defs
      Removed value: -{
      -  "ToolError": {
      -    "description": "A non-fatal problem encountered while scraping.",
      -    "properties": {
      -      "message": {
      -        "title": "Message",
      -        "type": "string"
      -      },
      -      "url": {
      -        "title": "Url",
      -        "type": "string"
      -      }
      -    },
      -    "required": [
      -      "url",
      -      "message"
      -    ],
      -    "title": "ToolError",
      -    "type": "object"
      -  }
      -}
    • removedOutput schema / properties / count / title
      Removed value: -"Count"
    • removedOutput schema / properties / data / title
      Removed value: -"Data"
    • removedOutput schema / properties / errors / items / $ref
      Removed value: -"#/$defs/ToolError"
    • addedOutput schema / properties / errors / items / description
      Added value: +"A non-fatal problem encountered while scraping."
    • addedOutput schema / properties / errors / items / properties
      Added value: +{
      +  "message": {
      +    "type": "string"
      +  },
      +  "url": {
      +    "type": "string"
      +  }
      +}
    • addedOutput schema / properties / errors / items / required
      Added value: +[
      +  "url",
      +  "message"
      +]
    • addedOutput schema / properties / errors / items / type
      Added value: +"object"
    • removedOutput schema / properties / errors / title
      Removed value: -"Errors"
    • removedOutput schema / properties / scraper / title
      Removed value: -"Scraper"
    • removedOutput schema / properties / source_urls / title
      Removed value: -"Source Urls"
    • removedOutput schema / title
      Removed value: -"ScrapeToolResult"
  4. Addedv1.3.0
  5. Removedv1.2.0
  6. Added

TDQS

A3.8/5.0
Behavior2/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 reveals that rates are 'live' and provides the exact return structure, which is useful. However, it does not disclose potential pitfalls such as invalid currency codes, handling of unknown target codes, rate staleness, or external API dependencies. For an unannotated tool, this is a notable gap.

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?

Two sentences: the first states the core action concisely; the second handily illustrates the return structure with a concrete example. No redundant wording, front-loaded purpose.

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?

For a simple three-parameter, all-optional tool, the description plus rich schema fully cover how to call it and what to expect. The return example doubles as a de facto output schema. The only missing piece is error behavior, but that is not strictly required for a straightforward conversion tool.

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

Parameters3/5

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

Schema description coverage is 100%, with detailed descriptions for 'to', 'base', and 'amount', including examples and defaults. The description adds no extra parameter meaning beyond the schema, so the baseline of 3 is appropriate.

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 states a specific verb ('Fetch live exchange rates and convert') and resource (currencies), clearly distinguishing it from all sibling tools, which are spam/scrapers/search tools. No ambiguity.

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?

There is no direct sibling for currency conversion, so no alternative routing is needed. The description clearly implies this is the tool for any currency-conversion need. It lacks explicit 'when not to use' guidance, but the scope is obvious from the unique functionality.

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