Match amounts (FX drift)
match_amounts_with_fx_driftCompare two amounts in different currencies using a supplied FX rate and check whether their percentage difference stays within a tolerance for cross-currency reconciliation.
Instructions
Compare two amounts in different currencies within an FX drift tolerance.
Purpose: Converts currency amounts using a provided exchange rate and verifies if the percentage difference falls within an acceptable tolerance window using exact decimal arithmetic.
When to use:
When reconciling cross-currency payments with conversion timing or rate variance.
When evaluating FX tolerance bounds on cross-border transactions.
When NOT to use:
Designed for cross-currency comparisons with a positive fx_rate; use reconcile for same-currency tolerance matching.
Rejects zero or negative FX rates.
Behavioral transparency: Pure mathematical calculation; read-only and idempotent.
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_a": "<amount_a>",
"currency_a": "<currency_a>",
"amount_b": "<amount_b>",
"currency_b": "<currency_b>",
"fx_rate": "<fx_rate>"
},
"name": "match_amounts_with_fx_drift"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| fx_rate | Yes | Units of currency_a per one unit of currency_b (e.g. an EUR/USD quote of 1.08 is USD per EUR). | |
| amount_a | Yes | Amount denominated in currency_a. | |
| amount_b | Yes | Amount denominated in currency_b. | |
| currency_a | Yes | ISO 4217 code of amount_a. | |
| currency_b | Yes | ISO 4217 code of amount_b. | |
| tolerance_pct | No | Max percentage difference still counted as a match. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||