{ | |
"name": "convert_currency", | |
"description": "Convert between currencies with optional historical rates and fee calculation", | |
"parameters": { | |
"type": "object", | |
"properties": { | |
"amount": { | |
"type": "number", | |
"description": "Amount to convert", | |
"minimum": 0 | |
}, | |
"from_currency": { | |
"type": "string", | |
"description": "Source currency code (USD, EUR, GBP, etc.)", | |
"pattern": "^[A-Z]{3}$" | |
}, | |
"to_currency": { | |
"type": "string", | |
"description": "Target currency code (USD, EUR, GBP, etc.)", | |
"pattern": "^[A-Z]{3}$" | |
}, | |
"date": { | |
"type": "string", | |
"description": "Date for historical rates (YYYY-MM-DD), defaults to current", | |
"format": "date" | |
}, | |
"include_fees": { | |
"type": "boolean", | |
"description": "Include conversion fees in calculation", | |
"default": false | |
}, | |
"precision": { | |
"type": "integer", | |
"description": "Decimal places for result", | |
"minimum": 0, | |
"maximum": 8, | |
"default": 2 | |
} | |
}, | |
"required": ["amount", "from_currency", "to_currency"] | |
}, | |
"test_questions": [ | |
"Convert $500 USD to Euros", | |
"How much is 1000 Japanese Yen in British Pounds with fees included?", | |
"Convert 250 EUR to CAD using rates from 2023-12-01" | |
] | |
} |