Convert between currencies at the ECB rate
convertAn amount converted between any two currencies the ECB lists, at its fixing in force on a day, computed exactly and rounded once. The euro to a currency is amount x rate, a currency to the euro is amount / rate, and two currencies go through the euro as amount x rate(to) / rate(from), both rates from the same fixing; no rate is rounded on the way. Answers the result with the rate or rates used and the fixing's date, and a sentence stating the rule, so the conversion can be quoted and checked. The ECB's rates are reference rates, not rates a bank or card will give.
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"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| to | Yes | The currency wanted, or EUR. ISO 4217; case ignored. | |
| date | No | The day of the conversion, YYYY-MM-DD in Frankfurt (an invoice's date, a payment's); default today. | |
| from | Yes | The amount's currency, or EUR. ISO 4217; case ignored. | |
| amount | Yes | The amount, as a decimal string: "1250.50", "-75". Never a number. | |
| places | No | Digits after the point in the result. | |
| rounding | No | How the result is rounded, once: half-up (halves away from zero, as invoices round) or half-even (banker's). | half-up |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ok | Yes | ||
| to | Yes | ||
| date | Yes | The day asked for | |
| from | Yes | ||
| note | No | ||
| rates | Yes | The rate of each non-euro currency in the conversion, units per 1 EUR, from the one fixing: one for a euro conversion, two for a cross rate | |
| amount | Yes | The amount converted, as given | |
| places | Yes | ||
| result | Yes | The converted amount, computed exactly and rounded once | |
| source | Yes | ||
| meaning | Yes | ||
| rounding | Yes | ||
| fixing_date | Yes | The date of the ECB fixing the conversion used |