View on GitHub

Tool calling: how an AI runs your code

AI engineering planned

The model doesn’t run your function. It writes a request, and your code decides.

The idea

When an assistant books a meeting or queries a database, the model itself only produces text: a structured request naming a tool and its arguments. Your code validates that request, runs the tool, and sends the result back.

This is the contract behind agents and protocols like MCP. Getting it right, with schemas, validation and permission checks, is most of what makes an agent safe to deploy.

What the lesson will build

Key ideas

The video

When it’s published, the code will live in ai-engineering/ and this page will link to it.


All topics · Suggest a topic