math_eval
Safe arithmetic without eval(): +-*/, **, parentheses, math functions (sqrt, sin, log, round, abs, min, max…), constants pi/e, optional variables. Expression up to 500 chars, no code execution. Cost €0.0005 per call, charged to the API key in Authorization: Bearer. Parameters — expression: string, e.g. '(2+3)*sqrt(16)'; vars: JSON object name→number, optional.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "math_eval"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| vars | No | ||
| expression | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |