Skip to content
bits
Give your model tools · Lesson 1 of 10

Why models need tools

Tutor:

On its own, Claude is a very good text predictor. That gets you a long way, but there are three things it can't do by predicting text, however good the prompt is.

It can't fetch. It knows what was in its training text, up to a cutoff date. It doesn't know today's weather, your order history, or what's in your database.

It can't compute reliably. It does sums the way it does everything else: by predicting what comes next. That's usually right for small numbers and easy to get wrong for big ones.

It can't act. Writing “I've sent the email” is just more text. Nothing leaves the building.

Tutor:

Tools close all three gaps. You describe a function to Claude: its name, what it's for, and what inputs it takes. When a question needs it, Claude doesn't guess. It replies with a request to call the function, with the arguments filled in. Your code runs it and hands back the result, and Claude writes the answer from real data.

Anthropic calls this tool use. Other providers call it function calling. It's the same idea.

Claude, no tools vs Claude with a get_weather toolillustrative: made-up numbers that show the idea, not output from a real modelcompare

promptDo I need a coat in Chicago right now?

Claude, no tools

I can't check live weather, so I don't know what it's like in Chicago right now. In late October it's often cool, so a light coat is a safe bet. A weather app will tell you for sure.

Claude with a get_weather tool

Yes. It's 41°F and overcast in Chicago right now, so bring a coat.

Tutor:

The left answer is honest and not very useful. The right one is only possible because a tool looked up the weather. Claude never touched the weather service: it asked, your code fetched, and Claude read the result.

That split is the whole idea. The model decides; your code does. Claude picks the tool and the arguments, and your code stays in charge of what actually runs.

quick check+20 neurons
Tutor:

Which of these questions really needs a tool?

    Type your answer or tap an option · Enter checks

    Tutor:

    One more distinction before we build. Client tools run in your code: you write the function and you run it when Claude asks. Server tools run on Anthropic's side, like web search and code execution: you switch them on and Claude uses them without your code doing the work. Most of this course is about client tools, because they're how you connect Claude to your systems. Server tools get their own lesson near the end.

    Your turn. The sandbox on this page runs Claude with no tools at all. Ask it for something only a tool could know, like the weather somewhere right now, and tell it to say so if it can't check.

    Your turn

    Run your prompt and the replies land here.

      • Asks for something live, not yet
      • Lets it say it can't check, not yet
      • Ran at 1.0, not yet
      run at
      ~0 tokens

      Turn on JavaScript to run prompts.