TL;DRFunction calling exposes tools as schemas so the model returns structured calls to run.
The production pattern (also in ai-072): you give the model a list of functions with typed parameters; it decides when to call one and returns the function name + JSON arguments; your code executes and returns results, which the model uses to continue. It's structured output applied to actions — the reliable bridge between an LLM and real systems, and the foundation of agents and integrations.
Key points
Tools described as typed schemas
Model returns name + JSON arguments
Your code runs it, returns results
Structured output for actions; basis of agents
Common mistakes
Letting the model call tools with unvalidated args
Vague schemas → wrong/garbled calls
Exposing risky tools without guardrails
Try it: Trace one function-calling round-trip from schema to result.
Example code
<!doctype html><html><head><meta charset="utf-8"></head>
<body style="background:#06040d;color:#e6e0ff;font-family:monospace;padding:20px"><pre>schemas → model picks: {"name":"search","args":{"q":"x"}}
your code runs search("x") → returns results
→ model continues with the data</pre></body></html>