Function calling lets a model request that your code run a specific function with structured arguments, then use the result to complete its answer.
The developer declares available tools as named functions with JSON Schema parameters. When the model decides a tool would help, it emits a structured call — function name plus arguments — instead of prose; the application executes the function and returns the result, and the model continues with real data in hand. The model never runs anything itself; it only asks.
Introduced commercially in 2023, function calling is now universal across serious model APIs and is the mechanism beneath every agent framework: multi-step tool use is just function calling in a loop. Parallel calls, forced tool choice, and streaming arguments rounded out the feature set.
Tool definitions are billed input tokens on every request, and tool results are appended to a growing context, so tool-heavy agents pay a substantial token overhead — concise schemas and trimmed results are a real cost lever, and stable tool definitions are prime prompt-caching material.
Last revised 2026-07-05 · All glossary terms → · Live AI model pricing →