Net present value
calc_npvNPV of periodic cash flows (t = 0, 1, 2, ...; the t = 0 flow is not discounted) at a per-period discount rate given as a decimal. Deterministic: the same inputs always give the same result, with formula ID calc.npv@1, every step, and any warnings.
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": {
"cash_flows": "<cash_flows>",
"rate": "<rate>"
},
"name": "calc_npv"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| rate | Yes | Discount rate per period as a decimal, e.g. 0.08 for 8%. Match the cash-flow period: for monthly flows pass the monthly rate (e.g. 0.06 ÷ 12 = 0.005). Must be greater than -1. | |
| cash_flows | Yes | Periodic cash flows at t = 0, 1, 2, …; negative for outflows (e.g. purchase price at t = 0). At most 10000. |