Function calling (also called tool calling) is the mechanism that lets a language model use your code. The model never runs anything itself. You describe the functions it may use; when it decides one would help, it returns a structured request naming the function and its arguments, your code runs the function, and you send the result back so the model can continue. This works both in plain chat completions and inside Agent Service.
Keep reading for free
Create a free StudyToCert account to read the rest of this lesson: 5 more sections, 4 key terms, a real-world example, an exam tip and self-check questions. Every lesson, lab and practice test is free with an account.