← Back to all posts

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

  1. Add Calculator, enable Tool Mode, and connect the tool output to Agent Core.
  2. Ask the Agent to calculate a test expression and confirm the result.

Normal mode

  1. Enter an expression or connect Text Input to Expression.
  2. Read the result field from the Data output.

Configuration

SettingWhat it controlsRecommended starting point
ExpressionDefines the numeric expression to evaluate.Try (100 + 50) * 0.15.
Tool ModeReplaces 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.

← Back to all posts