Skip to main content
Glama

Convert currency

convert
Read-onlyIdempotent

Convert an amount from one currency to one or more targets at the reference rate for date, optionally PPP-adjusted. Use for any single-pair or amount conversion (for example "100 USD to EUR"). Use get_rates/get_rates_by_base for a full rate table, get_history for a series, and the analyze_* tools for statistics. amount defaults to 1 (each result then equals the rate); ppp=true applies purchasing-power parity and needs CUR:COUNTRY when a currency is used in more than one country; date must be today or earlier and defaults to the latest rate date. Returns { from, amount, date, results[] }, each result carrying result, rate, and an optional ppp block. Invalid codes or dates return a 4xx error; no rate for the date is a 404. Requires a signed-in connection; each successful call bills 1 API request.

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": {
      "from": "<from>",
      "to": "<to>"
    },
    "name": "convert"
  }
}

Input Schema

NameRequiredDescriptionDefault
toYesOne or more target currencies, comma-separated, e.g. EUR,INR (max 25). For PPP, pass CUR:COUNTRY pairs (e.g. EUR:DEU,INR:IND) when a currency is used in more than one country; common currencies are resolved automatically.
pppNoWhen true, apply a PPP adjustment. Pass CUR:COUNTRY for currencies used in more than one country; common currencies (USD, EUR, INR and others) resolve automatically.
dateNoRate date in YYYY-MM-DD (UTC). Must not be in the future. Defaults to latest.
fromYesSource currency (ISO 4217), e.g. USD. For PPP (ppp=true), pass CUR:COUNTRY (e.g. USD:USA) when the currency is used in more than one country; common currencies are resolved automatically.
amountNoAmount to convert. Optional, defaults to 1 (so each result equals the rate). When provided it must be a finite positive number.

Output Schema

NameRequiredDescriptionDefault
asOfNo
dateYes
fromYes
amountYes
messageNo
resultsYes
fromCountryNo
requestedDateNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "$schema": "http://json-schema.org/draft-07/schema#",
      +  "additionalProperties": false,
      +  "properties": {
      +    "amount": {
      +      "type": "number"
      +    },
      +    "asOf": {
      +      "additionalProperties": {
      +        "type": "string"
      +      },
      +      "propertyNames": {
      +        "type": "string"
      +      },
      +      "type": "object"
      +    },
      +    "date": {
      +      "type": "string"
      +    },
      +    "from": {
      +      "type": "string"
      +    },
      +    "fromCountry": {
      +      "type": "string"
      +    },
      +    "message": {
      +      "type": "string"
      +    },
      +    "requestedDate": {
      +      "type": "string"
      +    },
      +    "results": {
      +      "items": {
      +        "additionalProperties": false,
      +        "properties": {
      +          "ppp": {
      +            "anyOf": [
      +              {
      +                "additionalProperties": false,
      +                "properties": {
      +                  "fromFactor": {
      +                    "type": "number"
      +                  },
      +                  "result": {
      +                    "type": "number"
      +                  },
      +                  "source": {
      +                    "type": "string"
      +                  },
      +                  "toFactor": {
      +                    "type": "number"
      +                  },
      +                  "year": {
      +                    "type": "number"
      +                  }
      +                },
      +                "required": [
      +                  "fromFactor",
      +                  "toFactor",
      +                  "result",
      +                  "year",
      +                  "source"
      +                ],
      +                "type": "object"
      +              },
      +              {
      +                "additionalProperties": false,
      +                "properties": {
      +                  "error": {
      +                    "type": "string"
      +                  }
      +                },
      +                "required": [
      +                  "error"
      +                ],
      +                "type": "object"
      +              }
      +            ]
      +          },
      +          "rate": {
      +            "type": "number"
      +          },
      +          "result": {
      +            "type": "number"
      +          },
      +          "to": {
      +            "type": "string"
      +          },
      +          "toCountry": {
      +            "type": "string"
      +          }
      +        },
      +        "required": [
      +          "to",
      +          "result",
      +          "rate"
      +        ],
      +        "type": "object"
      +      },
      +      "type": "array"
      +    }
      +  },
      +  "required": [
      +    "from",
      +    "amount",
      +    "date",
      +    "results"
      +  ],
      +  "type": "object"
      +}
  2. First observed

TDQS

A4.6/5.0
Behavior5/5

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

Annotations already declare read-only, idempotent, non-destructive, closed-world, but the description adds what annotations cannot: signed-in auth requirement, per-call billing of 1 API request, 4xx on invalid codes/dates, and 404 when no rate exists for the date. It also notes the PPP country-resolution requirement, which is non-obvious behavior.

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-loaded with purpose, then usage routing, then parameter behavior, then return/error/auth notes in a logical order with no filler sentences. It runs long as one dense block, and the return-shape sentence partially duplicates the existing output schema, but nothing is gratuitous enough to call wasteful.

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?

For a 5-parameter conversion tool with an output schema present, the description covers the pieces the schema cannot: auth requirement, billing cost, error status semantics, PPP country-resolution rule, and date bounds. An agent has everything needed to call it correctly and interpret failures.

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 coverage is 100%, so all five parameters are already documented in the input schema, including the amount=1 default, PPP CUR:COUNTRY pairs, and the non-future date constraint. The description restates these rather than adding syntax or edge-case meaning beyond the schema, so the baseline 3 applies.

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 (convert an amount from one currency to one or more targets) and immediately names the scope boundary versus get_rates, get_history, and analyze_* tools. An agent can distinguish it from every sibling without opening a schema.

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 an explicit positive trigger ("any single-pair or amount conversion") with a concrete example, then routes the agent away to get_rates/get_rates_by_base for full rate tables, get_history for series, and analyze_* for statistics. Both when-to-use and when-not-to-use are covered.

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