Lesson 5 · 14 min
Function calling and tool use patterns
Use tool use to route decisions, call APIs, and build type-safe agent actions — from a single forced call to a full tool loop.
Tools as structured output
Tool use (function calling) is structured output taken further: instead of returning a JSON blob, the model selects which function to call and provides its arguments as a validated schema. This is the foundation of every agent system.