Artificial Intelligence

What is Function Calling?

Quick answer

A feature that lets a language model request a specific software function, with structured inputs, so an application can take an action or fetch data.

Function Calling, explained

Function calling, also known as tool use, allows developers to describe available functions to a model, including their names, purposes, and required parameters. When a user's request needs one of these functions, the model responds with a structured call rather than plain text. The application runs the function and returns the result to the model, which uses it to form a reply.

For example, a travel booking assistant might have a function for checking hotel availability. When a user asks for a room in Darjeeling next weekend, the model produces a call with the location and dates, the app queries the booking system, and the model summarizes the options. Function calling is the foundation of most AI agents. Applications should validate every call, because models can supply incorrect or unexpected parameters.

Related terms

Guides that mention Function Calling