Calculate
calculateEvaluate a safe arithmetic expression and return the numeric result. Supports +,-,*,/,**,%,sqrt,abs,round,floor,ceil,log,sin,cos,tan,pi,e. Use for derived figures (ratios, differences, percentages) that no tool output already provides.
Use when: Use when an agent must derive a value that tool outputs do not already include, such as a ratio, spread, or percentage. Do not use to re-derive pre-computed fields like std_30d or dca_baseline_90d that get_token_price_historical returns.
Limitations: Arithmetic only — no aggregation over tool history, no unit conversion, and no financial modeling beyond the listed functions. Errors return an error field rather than raising.
Alternatives: get_token_price_historical, get_datetime
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| expression | Yes | A safe arithmetic expression, e.g. '(3 + 4) * 2 / sqrt(9)' |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| error | No | ||
| result | No | ||
| expression | Yes |