convert_currency
Convert an amount between any two currencies using your own USD-based exchange rates. Provide the rate dictionary to perform the conversion.
Instructions
Convert an amount between any two currencies using a caller-supplied USD-based rate dict. The caller must provide current exchange rates (USD=1.0 base). Example: convert 1000 USD to INR with rates={'USD':1.0, 'INR':83.5}.
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_currency": "<from_currency>",
"to_currency": "<to_currency>",
"rates": "<rates>"
},
"name": "convert_currency"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| amount | Yes | Amount to convert. | |
| from_currency | Yes | ISO-4217 source currency code, e.g. 'USD'. | |
| to_currency | Yes | ISO-4217 target currency code, e.g. 'INR'. | |
| rates | Yes | Dict mapping currency codes to units-per-USD, e.g. {'USD':1.0,'INR':83.5,'EUR':0.93}. |