Why Agents Need Tools › A Simple Example: The Calculator Problem

Michael BrenndoerferJune 23, 20252 min read
AI Agent HandbookAll chapters
Part 5 of 15Tool Use - Extending the Agent's Abilities
Chapter 12Why Agents Need Tools › A Simple Example: The Calculator Problem
Reading section 4 of 10 · A Simple Example: The Calculator Problem · 2 minSection 4 of 10 · 2 min

Book contents

Section 4 of 10 · 2 min read

Why Agents Need Tools › A Simple Example: The Calculator ProblemOne section · Sections in this chapter4 / 10 ↓

Let's make this concrete. Imagine you ask your agent: "I'm buying 47 items at \23.50$ each. What's my total before tax?"

Without Tools

The agent might respond:

Let me calculate that for you.

47 items at $23.50 each...
47 × 23.50 = approximately $1,104.50

Your total before tax is about $1,104.50.

This looks reasonable. The agent even showed its work! And in this case, it happens to be correct. But the agent got lucky. It's approximating, not computing. Let's try a harder calculation where the approximation breaks down.

Ask: "What's 1,234×5,6781,234 \times 5,678?"

Let me work through this:
1,234 × 5,678 = approximately 7,010,000

So the answer is about 7,010,000.

The agent is approximating. It's using patterns from its training to estimate the result. Sometimes it gets close. Sometimes it's way off. You can't rely on it for precise calculations.

With Tools

Now imagine the agent has access to a calculator tool. When you ask "What's 1,234×5,6781,234 \times 5,678?", the agent:

  1. Recognizes this is a math problem
  2. Decides to use the calculator tool
  3. Calls calculator.multiply(1234, 5678)
  4. Gets back the exact result: 7,006,652
  5. Responds: "The answer is 7,006,6527,006,652."

No approximation. No guessing. Just accurate computation. The agent used its intelligence to understand your question and decide a tool was needed, then used the tool to get the precise answer.