← Dashboard

Tools & Wires

Chapter 3: How the Model Touches the World

file
bash
web
edit
LLM
Step 1

The Model Is Locked in a Room

The LLM can't see your files. It can't run your code. It can't open a browser. It sits inside a sealed room and generates text. Tools are the doors in the walls. Each one lets the model touch one part of the world.

Step 2

A Tool Is Just a Schema

Every tool is a contract: a name, a description the model can read, typed parameters, and a return shape. The model never calls functions directly. It outputs JSON that matches the schema, and the harness executes it.

Step 3

Five Steps to Execute a Tool

Model outputs a tool call. Harness parses it. Validates against the schema. Executes the function. Injects the result back into context. Every production harness runs this exact pipeline. Skip validation and you get injection attacks.

Step 4

MCP: USB for AI Tools

Without a standard, every model needs a custom adapter for every tool. N models * M tools = N*M adapters. MCP (Model Context Protocol) is the universal plug: one standard that makes any tool work with any model.

N agents + M tools through 1 protocol = N+M connections.

Step 5

Fewer Tools, Better Results

Microsoft found that collapsing 100 fine-grained tools into 5 meta-tools improved agent success rates. Why? Models choke on too many choices. Click the button to see the difference.

Tool design is UX design for the model.

Step 6

Thin Wrappers Win

A good tool wrapper is thin: pass arguments through, return results cleanly. A bad tool wrapper is thick: it re-interprets, reformats, and hides information the model needs.

Let the model see the raw error message. Let it see the full file path. Abstraction helps humans but hurts agents.