calculate_math_expression
Calculate mathematical expressions safely to perform arithmetic operations, evaluate formulas, and compute results from user-provided input strings.
Instructions
Calculate a mathematical expression safely
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_math_expression"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| expression | Yes | Mathematical expression to evaluate (e.g., "2 + 2", "(10 + 5) * 3 / 2", "sqrt(16)") |