expression_eval
Evaluates mathematical expressions with variable substitution, supporting arithmetic, comparisons, and functions like sin, cos, log, sqrt.
Instructions
Evaluate mathematical expressions with variable substitution.
Supports +, -, *, /, %, ^ (power), parentheses, comparison/logical operators, the constants pi/e (and PI/E), and the functions sin, cos, tan, asin, acos, atan, log (base 10), ln, sqrt, pow, abs, exp, factorial. Variable names must start with a letter and may not collide with reserved names.
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": "expression_eval"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| variables | No | ||
| expression | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||