Give a language model real tools — define functions it can call, run the tool-use loop, handle parallel calls and errors, and build a multi-tool workflow.
Welcome to Tool Use & Function Calling, the third module of the Generative AI & LLM Engineering course. So far your model can only do one thing: produce text. It cannot look up today’s weather, query your database, send an email, or even reliably multiply two large numbers. Tool use removes that ceiling. You give the model a set of functions it is allowed to call, and it decides when to call them — turning a chatbot into something that can actually act.
You’ll start with why tools matter and watch the model honestly admit it can’t fetch live data, then ask for a tool instead. You’ll learn to define a tool with a JSON input schema, run the tool-use loop (the model requests a call, your code executes it, you return the result, the model continues) both by hand and with the SDK’s tool runner, and handle the real-world cases: parallel tool calls, errors, and strict schemas that guarantee valid arguments. The capstone assembles several tools into a small working agent.
Every example runs live against the inexpensive claude-haiku-4-5 model. A crucial idea to hold onto from the start: the model never runs your code. It only ever asks you to run a function and tells you the arguments; your program stays in control of what actually executes.
Start with Lesson 1, where you’ll see exactly why a text-only model needs tools — and watch it reach for one.
Complete all 5 lessons to finish the Tool Use & Function Calling module.