Function Calling
Function calling lets a model request execution of a developer-defined function by emitting a structured, schema-conforming set of arguments instead of free text. The application runs the function and returns the result, enabling models to fetch live data or take actions while the developer keeps control of execution.
Definition
Function CallingWith function calling, the developer describes available functions and their JSON parameter schemas. When a request would benefit from one, the model outputs a validated call naming the function and its arguments rather than answering directly. The application executes the call and feeds the result back, and the model incorporates it into its final response.
Function calling is the foundation of tool use and agentic systems: it bridges the gap between a text-generating model and real systems such as databases, APIs, and search. It also enforces structured output, since the arguments must match the declared schema.
Frequently asked questions
What is Function Calling?
Function calling lets a model request execution of a developer-defined function by emitting a structured, schema-conforming set of arguments instead of free text. The application runs the function and returns the result, enabling models to fetch live data or take actions while the developer keeps control of execution.
Sources
Related terms
← Full AI & prompt engineering glossary
Put Function Calling to work with Prompeteer, the Agentic Contextual AI Platform →