Calculate exactly
tcp_calculateCalculates exact decimal prices and totals from arithmetic expressions with time units (h, d, week, month) and labels such as EUR, GB, GiB, vCPU, and Mbit.
Instructions
Exact decimal arithmetic for prices and totals: + - * / ** and sum, min, max, abs, round(x, places), ceil, floor, pct(part, whole). Units count in hours: h, d (24 h), week (168 h), month (720 h, as the TCP price calculator counts it); EUR, GB, GiB, vCPU and Mbit are labels. Example: 0.051 EUR/h * 3 * 1 month. Use it for every number you compute.
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": {
"expression": "<expression>"
},
"name": "tcp_calculate"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| places | No | round the result to this many places, half up | |
| expression | Yes | the arithmetic, such as '0.051 EUR/h * 720 h * 3' |