LoopAI-103

Understand MCP tool discovery

Unit 2 of 6 · Module 9: Integrate MCP Tools with Azure AI Agents

Before you start

Short explainers for ideas this lesson builds on. Watch these first if they're new to you.

0 of 1 watched · about 2 min

Go deeper

Unlocks when you've watched the lesson.

0 of 1 watched · about 2 min
Read this lesson

Why discovery matters

As agents get more capable, the list of tools they can use keeps growing. Registering, updating, and wiring in every new tool by hand gets slow and messy. Dynamic tool discovery fixes that: the agent finds the tools it can use at runtime, while it's running. MCP brings three big advantages. First, dynamic discovery: the agent receives a list of available tools, with a description of what each one does. With a traditional API, you code each integration and update it whenever the API changes; with MCP, you integrate once. Second, it works across language models, so you can switch or compare models without redoing your integrations. Third, standardized security: one consistent way to authenticate across many MCP servers, instead of separate keys and methods for every API.

A live catalog

So what is dynamic tool discovery, exactly? Instead of hardcoding knowledge of each tool into the agent, the agent asks a central MCP server what's available. The server acts as a live catalog of tools the agent can understand and call. That means tools can be added, updated, or removed in one place, without touching the agent's code. The agent always gets the latest version of each tool, which helps accuracy and reliability. And the work of managing tools moves out of the agent and into a dedicated service.

Server, client, agent

Here's how it works. On the server, you write ordinary functions and mark them with the at mcp dot tool decorator, which exposes them as tools. In MCP, a tool is one of the basic building blocks a server can offer: something a client can ask it to run. A client connects to the server and fetches the tool list dynamically. It then creates function wrappers, small stand-ins for each remote tool, and adds them to the Azure AI agent's tool definitions. So the server hosts the tools, the client discovers them, and the agent uses them to answer requests. You get scalability, because you add or update tools without redeploying agents. Modularity, because agents stay simple and focus on delegating. Maintainability, because tools are managed centrally, with less duplication and fewer errors. And flexibility, because many kinds of tools and complex workflows can come together. It's especially useful when tools change quickly, or when many teams run different APIs and services.

Facts from Microsoft's documentation: Connect agents to MCP server endpoints (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.