Calculator
On this page
Purpose
Calculator evaluates a numeric expression and returns the result as Data. It supports addition, subtraction, multiplication, division, exponentiation, and parentheses.
When to use it
- Evaluate a fixed formula in a flow.
- Calculate a value from Text Input.
- Give Agent Core a narrow arithmetic tool.
How to use it
Tool Mode
- Add Calculator, enable Tool Mode, and connect the tool output to Agent Core.
- Ask the Agent to calculate a test expression and confirm the result.
Normal mode
- Enter an expression or connect Text Input to Expression.
- Read the
resultfield from the Data output.
Configuration
| Setting | What it controls | Recommended starting point |
|---|---|---|
| Expression | Defines the numeric expression to evaluate. | Try (100 + 50) * 0.15. |
| Tool Mode | Replaces the Data output with the evaluate_expression tool. | Leave it off for a fixed flow step. |
Expected result
A successful run returns Data such as {"result": "4"}. Invalid expressions and division by zero return error data with the original input. Results use floating-point arithmetic and are formatted to six decimal places when needed.
Reference details
Connect the normal Data output to Parser or Data Operations. In Tool Mode, connect the tool output to Agent Core's tools input.
