LoopAI-103

Options for implementing custom tools

Unit 3 of 6 · Module 8: Integrate custom tools into your agent

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
Read this lesson

Custom functions

There are four ways to give an agent your own tools in Foundry Agent Service. Custom functions, Azure Functions, OpenAPI tools, and Azure Logic Apps. Each one connects the agent to your apps, services, or infrastructure, in a different way. Let's start with custom functions, which use function calling. You describe each function to the agent: its name, what it does, and the parameters it takes. When a request needs one, the agent picks the right function from those descriptions and hands back its name and the arguments to use. Here's the key point: the agent doesn't run your function itself; your code does, and then passes the result back. That makes custom functions a flexible way to bring your own logic and workflows, in several programming languages, into an agent.

Azure Functions and OpenAPI

Next, Azure Functions: small pieces of code that run in the cloud when something happens, with very little setup. They're built around triggers and bindings. A trigger decides when the function runs, like a new message arriving in a queue. Bindings connect the function to its data, bringing input in and sending output out, without you writing that plumbing yourself. So an agent can hand work to an Azure Function, and the function takes care of talking to other systems. Then there are OpenAPI tools. OpenAPI is a standard way to describe an HTTP API: its addresses, the inputs each operation needs, and what comes back. Give the agent an OpenAPI 3.0 or 3.1 specification, and it can call that external API directly. Because the description is standard, the same spec also helps people understand the API, generate client code, write tests, and keep designs consistent.

Logic Apps, and choosing

The fourth option is Azure Logic Apps. Logic Apps lets you build workflows with little or no code, by connecting ready-made steps for apps, data, and services. It suits teams who'd rather assemble a process than program it. So, which one should you use? Custom functions, when you want your own code to run the logic. Azure Functions, for event-driven work that reacts to triggers and moves data through bindings. OpenAPI tools, when a web service already has an OpenAPI description. And Logic Apps, for low-code workflows across many services. Having all four gives your agents a wide range of ways to reach the systems you already use.

Facts from Microsoft's documentation: Use function calling with Microsoft Foundry agents; Connect OpenAPI tools to Microsoft Foundry agents; Integrate Azure Functions with Foundry Agents; 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.