Calculate Currency Exchange
calculate_currency_exchangeCalculate currency exchange with bank margin and show fees lost. Returns: {amount_source, from_rate_vs_usd, to_rate_vs_usd, mid_market_amount, amount_after_margin, fees_lost, ...}. See list_bundles for related 'voyage' calculators.
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_rate": "<from_rate>",
"to_rate": "<to_rate>"
},
"name": "calculate_currency_exchange"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| amount | Yes | Amount to exchange in source currency | |
| to_rate | Yes | Target currency rate vs USD (e.g. JPY=150) | |
| from_rate | Yes | Source currency rate vs USD (e.g. EUR=1.08) | |
| bank_margin_pct | No | Bank/exchange margin percentage (default 2.5%) |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | No | Computed result. Object whose fields depend on the tool (e.g. {tax, marginal_rate, brackets} for tax tools, {volume_l, gallons} for volume tools). | |
| source | No | Authoritative source for the rule or formula (e.g. "Article 197 CGI", "NF DTU 21"). | |
| formula | No | Human-readable formula or method used (e.g. "I=P·r·t", "Magnus formula"). | |
| reference_url | No | Link to a calcul2 page documenting the calculation in detail. |