The developer describes available functions — for example get_weather(city) — and the model decides when to call one and with which arguments. The application runs the function and returns the result to the model, which uses it in its answer.

Function calling turns chat models into agents that can look things up, act and update systems. See structured outputs and function calling.