Controlling tool availability
Decide which tools the model can call, and in what order, inside a single run. Watch a cancel tool stay hidden until the booking is read, a middleware check reject a call, and tool_choice force the first step.
12 minPro
Checking your access…
Inside this lesson
- An animation you play, pause and step through, with each part saying what it is doing.
- The real code beside it, with the lines for each step lit up.
- Practice mode, where you route each message yourself, and a short quiz.
- About 12 minutes.
Written from the official documentation
In this module: Tools
- Function toolsPlain Python functions the model can call.Pro
- Controlling tool availabilityShowing, hiding and forcing tools while a run is in progress.Pro
- Human in the loop: tool approvalAsking a person before a tool runs.Pro
- Hosted tools: code, files, web and computer useTools the model provider runs for you.Pro
- MCP tools: local and hosted serversConnecting MCP servers over stdio, HTTP or the provider.Pro
- Agents as toolsOne agent calling another as if it were a function.Pro