Exact calculator: arithmetic, fractions, big integers, functions ($0.002/call)
math_eval$0.002 per call (x402, USDC on Base; free trial: add "trial": true or use try_free). [Data utilities] Evaluates a math expression exactly: + - * / % ^ !, parentheses, big integers and fractions (1/3 stays 1/3), plus sqrt, round, floor, min, max, mean, gcd, lcm, comb, perm, ln, log, exp and trig (radians; deg constant). Returns result, fraction, decimal to N places, repeating decimal and whether it is exact. Input: expr, optional decimals 0-100. Limits: 1,000 characters, 10,000-digit values. Offline.
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": {
"expr": "<expr>"
},
"name": "math_eval"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| expr | Yes | Math expression, up to 1,000 characters, e.g. sqrt(16/9) + cbrt(-27) + 8^(1/3) or comb(52, 5): numbers, + - * / % ^ ! ( ), functions like sqrt(), round(x, 2), constants pi, e, deg | |
| trial | No | Optional. true = free if a trial call is left (3 per IP per UTC day), else the payment terms. | |
| decimals | No | Decimal places in "decimal", 0-100 (default 20) | 20 |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| tool | No | ||
| cache | No | ||
| exact | No | ||
| notes | No | ||
| _trial | No | Present when the call was a free trial call. | |
| digits | No | ||
| number | No | ||
| result | No | ||
| decimal | No | ||
| integer | No | ||
| rounded | No | ||
| decimals | No | ||
| fraction | No | ||
| provider | No | ||
| price_usd | No | ||
| repeating | No | ||
| expression | No | ||
| scientific | No |