Start

Home / Big ideas

Idea6-min read+5 pts

How AI Uses Tools and Scripts: Calling Instead of Guessing

With Josh Schultz ·

Answer. A tool is something an AI can call to do a job it should not guess at, such as searching the web, reading a file, or running a script. A script is a small program that does the same steps every time. The AI decides when to call a tool, and the tool does the exact work, so you get a checked result instead of a confident guess.

The picture

Diagram: a person asks a question, and the AI decides whether to call a tool. One path answers from memory and is marked "can sound right and be wrong." The other path calls a tool, such as search, read a file, or run a script, and the tool path is circled. A script box next to it is marked "same steps every time."

Start on the left, where you ask a question, and follow it to the middle, where the AI makes a choice. The upper path is the AI answering from what it already knows, which is fluent but can be wrong on exact things. The lower path is the AI calling a tool, and it is circled because the tool does the exact work. Next to it sits a script, one kind of tool, marked "same steps every time" because that is its whole job.

Think of it like this

Think of a machinist at the bench who needs to know whether a part is within tolerance. The machinist can eyeball it, or reach for a micrometer. A good machinist does not measure every surface, but knows which ones matter and reaches for the micrometer when it counts. The machinist decides what to measure and what to make of the number, and the micrometer does the exact measuring.

Now add the saved program on the CNC machine, which cuts the same part the same way every time, because it follows the same list of moves. Nobody has to remember the moves.

AI works the same way. The AI is the machinist, who decides when to measure and reads the result. A tool is the micrometer, which does the exact job. A script is the saved program, a list of exact steps that runs the same way each time.

Why does it matter at work?

It matters because an AI with no tools can only answer from what it learned, and a guess is risky when the answer is a number, a current fact, or something in your own files. A tool turns the guess into a lookup.

Here is an example. At Mesquite Ridge Metal Works, a buyer wants to know how Red Creek Steel's price for 4140 bar has moved over the year. A chat with no tools could only guess, or work from whatever quotes the buyer pasted in. With the quote-history skill switched on, Claude runs a script on the folder of saved quote files and hands back the page the script builds, and the skill's own rule says the page only comes from the script. The same files give the same page every time, which is also why AI should not do your math in its head. As I wrote in that guide, "Asking a chat for the report every month is like measuring every part by hand, while building the script is like building a jig: it takes care up front, and then every part comes out the same."

So when a vendor shows you an AI tool, two questions are worth asking. "Which tools can it call?" tells you what it can look up and do. "Which of them can change things?" tells you what could go wrong.

How does it work?

There are four parts: the AI chooses, the tool works, a script is a tool made of saved steps, and you control which tools are on.

The AI chooses when to call. The AI reads your request along with a short description of each tool it has, and decides whether one of them fits. If it does, the AI asks for the tool to be run, and a separate piece of software runs it. Because the AI makes this choice by reading, it can still skip a tool it should have used, so a clear request helps.

The tool does the exact work. A tool is ordinary software, such as a search, a file reader, or a calculator, and it does not guess. It sends a result back, and the AI reads that result and explains it to you. The result is what you check, more than the AI's explanation of it.

A script is a tool made of saved steps. A script is a small program, a list of exact steps a computer follows the same way every time. People call this deterministic, which means the same input always gives the same output. That is what you want for work that repeats, such as a monthly report. You can have AI build the tool once, and then the script does the repeat job without any new guessing.

You control which tools are on. Some tools only look, like search or reading a file, and others change things, like sending an email or editing a file. You keep AI safe by choosing which tools it gets, which is the subject of AI tools and permissions. Tools can be built into an app or plugged in through a connector (see how AI connects to your systems), and a common standard for plugging them in is called MCP, covered in what is MCP.

Diagram: three example tools in a row. Search, with the note looks things up. Read a file, with the note opens your actual file. Run a script, with the note repeats saved steps exactly. A note below says you choose which ones are on.

Where do people get it wrong?

Most mistakes come from assuming the AI always has tools, or from trusting its description of what a tool did. These are the four I see most often.

  1. Assuming every chat has tools. A blank chat has only what the AI learned. Check whether search, file reading, or code running is switched on, because an AI with no tool will still give you an answer, just a guess.
  2. Trusting the description instead of the result. A reply can sound right even when the output is wrong, so open the page or the file the tool produced and check it.
  3. Switching on tools that change things too early. Start with tools that only look, and add the ones that edit or send once you trust the setup.
  4. Asking AI to redo a repeat job from scratch each time. If the job comes back every month, have a script do it, and use AI for the messy part, such as reading a quote PDF.

Try this in 2 minutes

This test shows what an AI does when it has no tool and you ask for an exact number. Use a blank chat with no search, files, or code turned on.

  1. Open a new chat and paste this:
Multiply 4,872.35 by 1,263.4 and give me the answer. Then say in two plain sentences whether you would trust your own answer on a purchase order, and what you would use instead if you were allowed to.
  1. Here is what I expect: an answer, and then some honesty about whether it should be trusted.
  2. Check the answer on a calculator.

A chat reply. The first line says 4,872.35 times 1,263.4 equals 6,155,726.99. Below it, Claude says it would not rely on unverified mental arithmetic for a purchase order and would use a calculator, spreadsheet, or short script instead. The words calculator, spreadsheet, or a short script are circled.

When I tried this, Claude answered "4,872.35 × 1,263.4 = 6,155,726.99." I checked it with a calculator program, and the number was right. What I liked was what came next: "I wouldn't rely on unverified mental arithmetic for a purchase order. If I were allowed, I'd use a calculator, spreadsheet, or a short script with decimal arithmetic to compute it exactly and check it."

Notice what that means. Being right once is not the same as being reliable, because a guess can come out right today and wrong tomorrow. Claude itself named the fix, which is a tool, and a tool gives the same exact answer every time.

Frequently asked questions

What is a tool in AI?

A tool is something an AI can call to do a specific job, such as searching, reading a file, doing math, or running a script. The AI decides when to call it, and the tool does the exact work.

What is a script?

A script is a small program, a list of exact steps a computer follows the same way every time. It has no judgment of its own, which is why it is dependable for repeat work.

Does AI always use a tool when it has one?

No. The AI decides based on your request and the tool's description, so it can skip a tool or pick the wrong one. Ask for the tool by name when it matters, and check the result.

Use it today

From my training: we let AI build a script once, then the script does the repeat job, so AI is only used where judgment is needed.

Ideas are worth 5 points. Guides are worth 10 and up.

Get your first win this week.

One minute. Three guides picked for your job.

Start my first win