A narrated, hands-on workshop · ~75 min · for builders ready to let the model act

Stop asking the model for answers. Let it act.

Press play and we will build the function-calling loop together — define, ask, execute, return — and then the half nobody demos: allowlists, confirmation gates, and a money tool that computes once, acts once, and refuses rather than guesses.

13 chapters · player controls live at the bottom

Conversation simulated model · scripted

Press Run the loop to watch all four beats, or Step to walk them one at a time.

Tool runtime real code · runs here

calculatoridle
calendar · Tuesday2 events

Add one yourself, then run the loop again — the tool reads the same list you just changed.

Loop trace — the four beats

Nothing has happened yet.

Beat 1 you · Beat 2 the model asks (simulated) · Beat 3 your code executes (real) · Beat 4 the result goes back. Only beat 2 is scripted on this page.

Ch. 1 / Mental model ▶ narrated

The model never runs anything. It asks.

A language model produces text. That is the whole of its physical capability. Tool use does not change that — it changes what some of that text means to the program on the other side.

🧑

You

"How many hours is that?"

🤖

Model

Emits a structured request: calculator(expression). Then stops.

⚙️

Your code

Recognises it, decides, executes, catches errors.

↩︎

Back

Result re-enters the conversation as a message.

📮

A request, not a command

The model's output is a suggestion with a schema attached. Nothing in the protocol obliges you to run it.

you are the executor

It stops and waits

After asking, the turn ends. Nothing happens until your code sends a result back and asks for another turn.

two round trips minimum
🧠

It cannot see side effects

If your function wrote to a database, the model only learns that from the string you return. Silence reads as success.

return what happened
Say it out loud once: "the model asked, my code did." Every incident review you ever write about an agent will come back to that sentence.

Ch. 2 / Mental model ▶ narrated

Define, ask, execute, return. That is the whole protocol.

BEAT 01

Define

You send a list of tools alongside the conversation. Names, descriptions, parameter schemas. Every turn.

BEAT 02

Ask

The model replies with a tool-use block: a name, an id, and an arguments object. Its turn ends there.

BEAT 03

Execute

Your code validates and runs the real function. This is the only beat where anything happens in the world.

BEAT 04

Return

You append a tool-result message carrying the same id, and ask for another turn.

Underneath it all there is just an array of messages that keeps growing. Step through one and watch it fill up — this is the ledger you will be staring at when something goes wrong.

0 messages · 0 characters

messages[] real array, rendered live

What just happened

The id is load bearing. Every tool-result must carry the id of the tool-use block it answers. Get it wrong and the model cannot tell which question your answer belongs to.

Ch. 3 / The first real skill ▶ narrated

Your tool description is not documentation. It is the instruction.

A tool definition has three parts, and every one of them is read by the model before it decides anything. The name is a hint. The description is an instruction. The parameter schema is a contract you must still enforce yourself.

🏷

name

Short, lowercase, verb plus object. find_free_slot beats calendarHelper. The model reads it as a summary.

first thing it scans
✍️

description

Say what it does, when to use it, and when not to. This is the highest-leverage text in your whole system.

this is a prompt
📐

parameters

JSON Schema. Types, enums, required list, units in the name. Descriptions on fields are read too.

and validated by you

Below is a working checker. It is not an opinion generator — it counts things and reports what it counted. Load the weak example, read the findings, then load the strong one and watch which checks flip.

Findings measured on your text

Press Check it.

Every line above is a count or a boolean taken from what you typed. No scores are invented and nothing is sent anywhere.

The one-line test. Read your description as if you had never seen the codebase. Can you tell, from that sentence alone, which of two similar tools to reach for? If not, the model cannot either.

Ch. 4–12 / Locked

That's the free preview.

You've heard the setup. The remaining 9 chapters are where Tool Use actually gets built — the guardrails, the hands-on builds, the full narrated walkthrough and the end-of-workshop check.

Get the full workshop → See the catalog

One file. Yours forever. Works offline, in any browser, on any device.

Transcript

Now playing
Ready — press play to begin
0.95×
🎙
Free preview