AI

Function Calling

The AI pulling a lever that triggers a real-world action — pushing a button on the Enterprise bridge that actually does something.

Function calling (used interchangeably with "tool use" across different providers) is the mechanism by which a language model can invoke external capabilities by generating a structured function invocation rather than a text response. The developer defines a set of available functions — with names, descriptions, and typed parameter schemas — and includes these definitions in the API call. When the model determines that calling one of these functions would help answer the question or complete the task, it generates a structured JSON object specifying the function name and argument values rather than (or in addition to) a text response. The application catches this invocation, executes the corresponding function with the provided arguments, and returns the result to the model in a subsequent API call. The model then incorporates the function result into its reasoning and may call another function or produce the final response.

The defining technical characteristic of function calling is that the model generates structured, typed arguments — not free-text instructions. When a function requires a date in ISO 8601 format, the model generates exactly that format, not a natural language date description that would need to be parsed. When a function requires a specific enum value, the model selects from the defined options, not an invented variant. This reliability of structured invocation is what makes function calling the foundation of agentic systems — unlike asking a model to "describe what you would do" (which requires parsing the description to determine the actual action), function calls produce machine-executable specifications that the application can act on deterministically.

For B2B teams, function calling enables AI to become an active participant in business systems rather than a passive text generator. A sales AI equipped with function calls to query the CRM, create activities, draft emails, and update opportunity stages can move through a prospect research workflow and execute each step rather than simply advising what steps to take. A content operations AI with functions to search the asset library, retrieve content performance metrics, and create new content records can actively manage the content pipeline rather than providing suggestions for humans to implement manually. The engineering investment in designing good function interfaces — clear descriptions, sensible parameter types, predictable return values — pays compounding returns as the functions become reusable building blocks for multiple AI-powered workflows.

function callingtool useAI agentAPILLMstructured output

Related terms