Function tools
Give an agent a plain Python function it can call. Watch the model ask for the tool, the framework run it, and the answer come back, including what happens when a tool is not needed or fails.
10 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 10 minutes.
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