Skip to main content
Glama

convert_currency

Convert an amount between currencies using live exchange rates. Specify base and target currencies to get converted values and unit rates for all or selected targets.

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. Dates show when Glama detected each change.

  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

A4.1/5.0
Behavior4/5

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

With no annotations provided, the description carries the burden of disclosing behavior. It sufficiently explains the return format with a concrete example and notes that rates are live. It does not mention error behavior (e.g., invalid currency codes), but for a simple read-only conversion tool, the provided context is adequate.

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 concise and well-structured: the first sentence states the purpose, and the second provides a concrete return format example. Every sentence adds value, with no wasted words.

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?

The tool is simple, the input schema fully documents all parameters, and an output schema exists. The description also illustrates the return structure, making the tool contextually complete for an agent to use effectively.

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 each parameter already including a description, defaults, and examples. The tool description adds no additional parameter semantics beyond what the schema provides, 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 clearly states the tool fetches live exchange rates and converts amounts, which is a specific verb+resource combination. It distinguishes the tool from sibling tools, as no other sibling handles currency conversion.

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?

Usage is implied by the description: it is for fetching live exchange rates and converting amounts. However, there is no explicit guidance about when to prefer this over alternatives or when not to use it, though no obvious alternative exists among siblings.

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

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/mldsveda/PyScrappy'

If you have feedback or need assistance with the MCP directory API, please join our Discord server