Explain it simpler
Function calling is how a chatbot asks your program for help. The model cannot run anything itself. You give it a short menu: 'here is a function called get_order_status, it needs an order number'. When a customer asks about an order, the model writes back a neat request, like a filled-in form, saying 'please run get_order_status with ORD-5521'. Your program reads that form, checks it makes sense, looks up the real order, and hands the answer back. Then the model writes a friendly reply using the true information. It is like a waiter writing your order on a slip for the kitchen: the waiter does not cook, but the slip has to be clear and the kitchen should check it before cooking.
It is Monday morning at Copperline Outfitters and the support chatbot just told a customer that order ORD-5521 'shipped yesterday and arrives Thursday'. The trouble is that the bot has no idea where any order is. Nobody connected it to the order system, so it invented a confident answer. Priya, the product owner, asks you to fix it by Friday. You know the model must not guess; it needs to ask your code to look the order up and then wait for the real answer. But how does a model that only produces text ask your code for anything, and how do you make sure it cannot look up somebody else's order?
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 the same way in plain chat completions with Azure OpenAI and inside Azure AI Foundry Agent Service, which is why the exam treats it as a core skill.
Keep reading for free
Create a free StudyToCert account to read the rest of this lesson: 8 more sections, 6 key terms, a real-world example, an exam tip and self-check questions. Every lesson, lab and practice test is free with an account.