
What the terraform providers command tells you
July 1, 2025Windows Server 2025 Hyper-V Workgroup Cluster with Certificate-Based Authentication
July 1, 2025Welcome back to Agent Support—a developer advice column for those head-scratching moments when you’re building an AI agent! Each post answers a real question from the community with simple, practical guidance to help you build smarter agents.
Today’s question comes from someone trying to move beyond chat-only agents into more capable, action-driven ones:
💬 Dear Agent Support
I want my agent to do more than just respond with text. Ideally, it could look up information, call APIs, or even run code—but I’m not sure where to start. How do I give my agent access to tools?
This is exactly where agents start to get interesting! Giving your agent tools is one of the most powerful ways to expand what it can do. But before we get into the “how,” let’s talk about what tools actually mean in this context—and how Model Context Protocol (MCP) helps you use them in a standardized, agent-friendly way.
🛠️ What Do We Mean by “Tools”?
In agent terms, a tool is any external function or capability your agent can use to complete a task. That might be:
- A web search function
- A weather lookup API
- A calculator
- A database query
- A custom Python script
When you give an agent tools, you’re giving it a way to take action—not just generate text. Think of tools as buttons the agent can press to interact with the outside world.
⚡ Why Give Your Agent Tools?
Without tools, an agent is limited to what it “knows” from its training data and prompt. It can guess, summarize, and predict, but it can’t do. Tools change that!
With the right tools, your agent can:
- Pull live data from external systems
- Perform dynamic calculations
- Trigger workflows in real time
- Make decisions based on changing conditions
It’s the difference between an assistant that can answer trivia questions vs. one that can book your travel or manage your calendar.
🧩 So… How Does This Work?
Enter Model Context Protocol (MCP).
MCP is a simple, open protocol that helps agents use tools in a consistent way—whether those tools live in your app, your cloud project, or on a server you built yourself.
Here’s what MCP does:
- Describes tools in a standardized format that models can understand
- Wraps the function call + input + output into a predictable schema
- Lets agents request tools as needed (with reasoning behind their choices)
This makes it much easier to plug tools into your agent workflow without reinventing the wheel every time!
🔌 How to Connect an Agent to Tools
Wiring tools into your agent might sound complex, but it doesn’t have to be! If you’ve already got a MCP server in mind, there’s a straightforward way within the AI Toolkit to expose it as a tool your agent can use.
Here’s how to do it:
- Open the Agent Builder from the AI Toolkit panel in Visual Studio Code.
- Click the + New Agent button and provide a name for your agent.
- Select a Model for your agent.
- Within the Tools section, click + MCP Server.
- In the wizard that appears, click + Add Server.
From there, you can select one of the MCP servers built my Microsoft, connect to an existing server that’s running, or even create your own using a template! After giving the server a Server ID, you’ll be given the option to select which tools from the server to add for your agent.
Once connected, your agent can call tools dynamically based on the task at hand.
🧪 Test Before You Build
Once you’ve connected your agent to an MCP server and added tools, don’t jump straight into full integration. It’s worth taking time to test whether the agent is calling the right tool for the job.
You can do this directly in the Agent Builder: enter a test prompt that should trigger a tool in the User Prompt field, click Run, and observe how the model responds. This gives you a quick read on tool call accuracy.
If the agent selects the wrong tool, it’s a sign that your system prompt might need tweaking before you move forward. However, if the agent calls the correct tool but the output still doesn’t look right, take a step back and check both sides of the interaction. It might be that the system prompt isn’t clearly guiding the agent on how to use or interpret the tool’s response. But it could also be an issue with the tool itself—whether that’s a bug in the logic, unexpected behavior, or a mismatch between input and expected output. Testing both the tool and the prompt in isolation can help you pinpoint where things are going wrong before you move on to full integration.
🔁 Recap
Here’s a quick rundown of what we covered:
- Tools = external functions your agent can use to take action
- MCP = a protocol that helps your agent discover and use those tools reliably
- If the agent calls the wrong tool—or uses the right tool incorrectly—check your system prompt and test the tool logic separately to isolate the issue.
📺 Want to Go Deeper?
Check out my latest video on how to connect your agent to a MCP server—it’s part of the Build an Agent Series, where I walk through the building blocks of turning an idea into a working AI agent.
The MCP for Beginners curriculum covers all the essentials—MCP architecture, creating and debugging servers, and best practices for developing, testing, and deploying MCP servers and features in production environments. It also includes several hands-on exercises across .NET, Java, TypeScript, JavaScript and Python.
👉 Explore the full curriculum: aka.ms/AITKmcp
And for all your general AI and AI agent questions, join us in the Azure AI Foundry Discord! You can find me hanging out there answering your questions about the AI Toolkit. I’m looking forward to chatting with you there!
Whether you’re building a productivity agent, a data assistant, or a game bot—tools are how you turn your agent from smart to useful.