calculate_loan
Loan calculator — EMI / amortizing loan, with an optional first payment date that dates the schedule preview and gives the payoff date
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": {
"principal": "<principal>",
"annualRatePercent": "<annualRatePercent>",
"years": "<years>"
},
"name": "calculate_loan"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| years | Yes | Loan term in years, for example 30. | |
| principal | Yes | Starting amount owed or invested as a plain number, for example: 250000. | |
| previewMonths | No | How many months of the schedule to include, 0 to 12; default 0. | |
| firstPaymentDate | No | Optional date the first payment is due, as YYYY-MM-DD. Adds a date to every schedulePreview row and returns firstPaymentDate, lastPaymentDate and payoffDate for the whole loan. It only labels the schedule; the amounts do not change. A payment day of 29 to 31 moves to the last day of shorter months. | |
| annualRatePercent | Yes | Yearly interest rate in percent, for example: 6.5 for 6.5%. |