Why Agents Need Tools › A Simple Example: The Calculator Problem
AI Agent HandbookAll chapters 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 ?"
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 ?", the agent:
- Recognizes this is a math problem
- Decides to use the calculator tool
- Calls
calculator.multiply(1234, 5678) - Gets back the exact result:
7,006,652 - Responds: "The answer is ."
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.