Techniques & Methods
Function Calling
How LLMs invoke tools — the model outputs structured JSON instead of free text.
Also known as: tool calling,structured output
Function calling is the mechanism by which an LLM invokes external tools. You give the model a list of available functions with their parameter schemas; the model returns structured JSON specifying which function to call with which arguments. Your code executes the function and feeds the result back. Function calling is the foundation of every AI agent — RAG over your database, AI assistants that book meetings, Computer Use, Operator, every MCP integration. Reliability varies by model: Claude Opus 4.8 hits ~96% on tool-use benchmarks, GPT-5.6 around 95%, open models are catching up. Distinct from but adjacent to "tool use" — function calling is the API-level mechanism, tool use is the higher-level pattern.


