AI Glossary Term

What does “Function Calling” mean?

Definition

A model capability to generate structured calls that trigger external tools or APIs.

How Function Calling works

Diagram for Function Calling, a repeating loop: You ask: weather in Paris?; then Model outputs a structured call: get_weather('Paris'); then Your code runs the function; then Result goes back to the model; then Model writes the final answer; then back to the start.You ask: weather in Paris?Model outputs a structured call:get_weather('Paris')Your code runs the functionResult goes back to the modelModel writes the final answerrepeat

Example

A chatbot cannot know today's weather by itself. With function calling, it returns a structured request such as get_weather with the city, the app runs it, and the model uses the returned data to answer.

Why it matters

It connects language models to live data and real actions in a predictable format. The application, not the model, decides whether to execute each call.

Common questions

Does the model run the function?

No. It only produces the request. Your software executes it and returns results.

Is it the same as tool use?

They are closely related. Function calling is a common way to implement tool use through a defined schema.

What can go wrong?

The model might choose the wrong tool or arguments, so apps should validate inputs and limit what calls can do.

Learn more in our free guides

Test yourself

See also