Function calling
Also known as: tool calling · tool use · function call
Function calling (tool calling) is when a model, instead of just replying with text, decides to call a function and provides the structured arguments for it.
The loop:
- You tell the model what functions exist.
- The model emits a call:
get_weather(city="Bordeaux"). - Your code runs it, returns the result.
- The model uses the result to answer.
The leap from chat to action: function calling is how a model stops *describing* what to do and starts *doing* it. It's the foundation of every agent you'll ever build.