Phase 1 · Building with LLMs · Tools & agents
Tool use
Let the model call your functions (function calling).
Open this lesson Create a free account
Why it matters
On its own, a model can only write text. Tool use (also called function calling) lets it ask your code to do things: look up a campaign's live numbers, search the help center, check stock, create a draft. The model decides when a tool is needed and with which inputs; your code runs it and reports back. Every AI agent you've heard of is built on this one mechanism.
What you'll be able to do
- Describe a tool to the model with a name, a description and an input schema
- Read a tool_use block and run the matching Python function
- Send results back as tool_result blocks, including errors
- Complete one full round trip: question, tool call, result, final answer
Before this lesson
Next in this phase: The agent loop