calculate
Evaluate numeric arithmetic expressions using +, -, *, /, //, %, **, and parentheses. Get precise results without relying on manual calculation.
Instructions
Evaluate a numeric arithmetic expression and return the result.
Supports +, -, *, /, //, %, ** and parentheses. Use this for any arithmetic instead of computing it yourself — language models are unreliable at multi-digit math.
Args: expression: A numeric expression, e.g. "2 * (3 + 4) / 7".
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": "calculate"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| expression | Yes |