Try this first

Remember the question from Lesson 1.1: when an AI coding tool reads a file, who opens the
file?

Here is the answer, and it is the most important sentence in this module.

You do. Your program does. The model never touches your computer.

Let us prove it.

Give it a tool it cannot use

We will tell the model about a tool, then deliberately not write the tool.

from llm import connect

llm = connect("ollama:gemma4")

TOOLS = [
    {
        "name": "get_time",
        "description": "Get the current time on this computer.",
        "input_schema": {"type": "object", "properties": {}},
    }
]

reply = llm.send([{"role": "user", "content": "What time is it?"}], TOOLS)

print("stop:", reply.stop)
for call in reply.tool_calls:
    print("  it wants to call:", call.name, "with", call.arguments)

Run it. You will see it asking for get_time.

Now look at your clock. Nothing happened. No time was fetched. There is no get_time
function anywhere in that file — we never wrote one.

What you just did

You handed the model a menu. It pointed at an item. That is all a tool call is: a pointer at
a menu item, plus the arguments it would like you to use.

The model produced some text that says “I would like get_time to run”. It cannot run it.
It has no hands. It is a program that produces text, and a tool call is a specially shaped
piece of that text.

Everything an agent does to your machine, your files, and your network is done by your
code
, because you chose to run something when you saw that request.

The model asks. Your program acts. Nothing happens that you did not write the code to do.

Why this matters more than it sounds

Hold on to this, because three later modules grow out of it.

Module 3 (permissions) exists because your code is the thing that acts. You can put an
if statement in front of the action. The model cannot go around it, because it was never
doing the action in the first place.

Module 4 (recovery) exists because your code sees the result first. When a command fails,
you decide what the model gets told about the failure.

Module 5 (MCP) is a standard way of describing the menu, so that a menu written by
somebody else can be handed to a model by you.

This is also why the provider does not matter much. Every model in this course asks. None of
them act. The thing you are building is the part that acts.

Try this before the next lesson

Change the tool description to something vague, like "A useful tool.", and ask the same
question. Then make it precise again.

Watch whether the model still asks for the tool. You have just done, by accident, the
experiment that Module 2 is built on: the description is not documentation. It is the
instruction the model is following.