Skip to content
Agentic Workflowdocs
v0.8.2Install free

nodes / builtin / ai / aidependencies / tools

Calculator

Evaluate arithmetic expressions.

AI ExtensionWeb appAgent tool

Give an AI agent a calculator, so it computes numbers exactly instead of guessing.

Calculator is a tool for an agent, not a step in the flow. It has no output port: you connect it to the Tools slot of a Tools Agent, and the agent’s model can call it whenever it needs a result.

The model sends a math expression such as (1299 * 0.8) + 4.99 and gets the result back as text. If the expression can’t be read, the tool answers “I don’t know how to do that.” and the model carries on. It only computes: no approval is needed and nothing outside the run is touched.

  • The agent must add up prices, apply a discount or a tax rate, or convert units from data it read.
  • Answers must be exact: language models often get long arithmetic wrong.

For a fixed calculation you already know, skip the agent and use an expression in a regular node, for example {{ $input.price * 1.2 }}.

This node has no settings.

There is nothing to configure. The model writes the expression on each call.

This node has no output port. It plugs into a slot on another node instead of passing items along.

The result goes back to the model, not to the next node. You see it in the agent’s steps output, and the final answer in its response.

None. This node needs no connection and has no slots for other nodes.

  1. Get All Text reads your shopping cart page, with Output field name text.
  2. Tools Agent with Prompt Add up the item prices in this cart and apply a 15% discount: {{ $input.text }}, a Chat OpenAI model in Model, and Calculator connected to Tools.
  3. Display Markdown shows {{ $input.response }}.
  • The agent does the math itself and gets it wrong. Tell it in the Prompt or the System message to “use the calculator tool for every calculation”.
  • The tool answers “I don’t know how to do that.” The model sent something that isn’t a plain math expression, such as text with currency signs or words. Ask it to send numbers and operators only.
  • The Calculator is never called. Some small or on-device models handle tools poorly. Try a larger model.
  • Tools Agent: the agent this tool plugs into.
  • Think: let the agent plan multi-step work before calculating.
  • Tool Selection: how an agent chooses between its tools.
Edit page

Last updated:

Was this page useful?
Ask Aria about Calculator