What are tools?
Unit 2 of 8 · Module 4: Develop generative AI apps that use tools
Go deeper
Unlocks when you've watched the lesson.
Read this lesson
Models that use tools
Some Foundry Models can do more than talk: they can use tools to look things up, or to get jobs done. To switch that on, your prompt tells the model which tools it's allowed to use, and you send that prompt through the OpenAI Responses API. So step one is finding a model in the Foundry Models catalog that supports tool calling, and deploying it. Step two is a client app that sends prompts to that deployment with the Responses API, each one carrying the list of tools on offer. Out of the box, the model itself decides whether a tool is needed, and which, just from reading the prompt, the way a handyman glances at a job and reaches for the right tool. You can steer those picks with tool selection rules, and with your instructions, the system prompt.
Four common tools
The Responses API comes with a handful of popular tools. Code interpreter gives the model a Python sandbox where it can write code and run it, handy for math or charts. Web search lets it look things up on the internet, so an answer about last week's news isn't limited to what it learned in training. File search lets it search documents you've uploaded into a vector search index, so it can answer from your own material, like a company handbook. And function lets it call functions that live in your own application code, like one that checks an order's status. That's just a sample: tools for agentic AI are one of the fastest-moving parts of the field.
Specifying tools
In code, you hand responses dot create a tools list, next to the model, the instructions, and the input. Each tool in that list is a JSON object with a type, like code interpreter or web search, plus whatever settings that tool needs. The list can hold one tool, or many. The model reads the prompt, calls the tools it needs, and the response's output text is built from what they sent back.
Facts from Microsoft's documentation: Use the Azure OpenAI Responses API (CC BY 4.0), rewritten in Loop's own words and examples. Narration, animation, and quiz by Loop. Microsoft, Azure, and Microsoft Foundry are trademarks of Microsoft. Loop is independent and not affiliated with or endorsed by Microsoft.