Skip to content

What is Function Calling?

A model capability that allows it to output structured requests to invoke predefined functions or tools rather than only generating text.

Function calling enables a language model to go beyond text generation by producing structured invocation payloads that map to developer-defined functions. The model receives a schema of available functions—including parameter names, types, and descriptions—and decides when and how to call them based on the conversation context. The host application then executes the function and feeds the result back to the model for further processing. This mechanism underpins tool use in agent systems, allowing models to interact with databases, APIs, file systems, and other external systems in a controlled and type-safe manner.