evaluate_math_expression
Evaluate complex mathematical expressions safely, including arithmetic, exponents, roots, trig functions, logarithms, and constants.
Instructions
Evaluate complex mathematical expressions safely.
Supports addition, subtraction, multiplication, division, exponents (^ or **), roots (sqrt, cbrt), trigonometric functions (sin, cos, tan), logarithms (log, log10, ln), and constants (pi, e).
Args: expression: The mathematical expression string (e.g., '2 * (3 + 4)', 'sqrt(144) + sin(pi / 2)', '5^3') precision: Number of decimal digits of precision for symbolic evaluation (default 10)
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": "evaluate_math_expression"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| precision | No | ||
| expression | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |