calculate
Evaluates arithmetic exactly for computed filing figures using named variables in expressions, supporting +, -, *, /, powers, parentheses, abs, round, min, max, sum, avg and sqrt.
Instructions
Evaluate arithmetic exactly. Use it for every computed figure. Give each input number a name in variables and use the names in the expression, e.g. expression '(capex_2018 / revenue_2018) * 100' with variables capex_2018=1577 and revenue_2018=32765. Supports + - * / **, parentheses, abs, round(x, digits) (half-up), min, max, sum, avg and sqrt.
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>",
"variables": "<variables>"
},
"name": "calculate"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| variables | Yes | Every input number, each with a name. | |
| expression | Yes | Arithmetic over the variable names. |