Convert currency
convertConvert 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
| Name | Required | Description | Default |
|---|---|---|---|
| to | Yes | One 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. | |
| ppp | No | When 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. | |
| date | No | Rate date in YYYY-MM-DD (UTC). Must not be in the future. Defaults to latest. | |
| from | Yes | Source 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. | |
| amount | No | Amount to convert. Optional, defaults to 1 (so each result equals the rate). When provided it must be a finite positive number. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| asOf | No | ||
| date | Yes | ||
| from | Yes | ||
| amount | Yes | ||
| message | No | ||
| results | Yes | ||
| fromCountry | No | ||
| requestedDate | No |