Function calling is a capability in which a developer describes functions and their argument formats to a language model, and the model responds with the function to call and its arguments as structured data such as JSON. The application or server runs the function and passes the result back to the model to complete the answer.
Because it yields output a program can handle directly instead of free-form text, it is the standard way to connect language models to external APIs and databases and to let AI agents use tools. It is also called tool calling or tool use.