calculate
Safely evaluate arithmetic expressions with +, -, *, /, //, %, **, and parentheses. Returns precise results without enabling function calls, variables, or imports.
Instructions
Safely evaluate a simple arithmetic expression and return the result.
Supported: +, -, *, /, //, %, ** and parentheses. No function calls, variables, or imports are allowed.
Examples: "2 + 2" → 4.0 "10 / 3" → 3.3333... "(3 + 4) * 2" → 14.0 "2 ** 8" → 256.0
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 |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |