← Develop AI Apps and Agents o… Latent Shelf · Ch.8

Module Study Guide · Path 2 · AI agents

Integrate Custom Tools Into Your Agent

Describe the tool well and let the agent decide when to use it — the declarative pattern beats manual orchestration.

— the module's principle

Extending an agent with your own capabilities. This module covers why custom tools matter, the four implementation options — custom functions, Azure Functions, OpenAPI specs, and Logic Apps — and how to integrate them through Foundry's tool objects.

4 tool optionsdeclarative patternOpenAPI & Functions13 quiz questions
01Four options

Ways to give an agent custom capabilities

Custom tools let a Foundry agent interoperate with your applications, external APIs, and services. There are four options, chosen by the nature of the integration.

The four custom-tool options.
OptionBest forHow
Custom functionCustom business logic, language flexibilityDescribe a function's structure; the agent calls it with arguments.
Azure FunctionsEvent-driven, serverless workflowsTriggers determine when it runs; bindings connect input/output data.
OpenAPI specificationExternal REST APIsAn OpenAPI 3.0 spec describes the HTTP API for standardized integration.
Azure Logic AppsLow/no-code workflow orchestrationVisually connect apps, data, and services without advanced code.
02How to integrate

Register, then let the agent decide

Integration follows one shape regardless of option: define the capability, register it via a Foundry tool object, add it to the agent's tools, and the agent autonomously invokes it when the prompt calls for it.

Key concept · The three integration methods

  • Function calling — write a Python function with clear parameters, register it via FunctionTool (name, parameter schema, description); the agent decides when to call.
  • Azure Functions — deploy the function, define input/output bindings, register via AzureFunctionTool; the agent sends requests through the bindings.
  • OpenAPI — create a JSON OpenAPI 3.0 spec, register via OpenApiTool (auth: anonymous, API key, or managed identity); the agent calls the external API per the spec.

Key concept · The declarative pattern

The critical rule: don't manually call custom tools in code. Instead, give tools meaningful names and well-documented parameters and let the agent autonomously decide when and how to call them. Good descriptions are what let the agent "figure out" tool usage — the declarative approach is what makes it intelligent.

★Test yourself

Chapter 8 quiz

Thirteen questions on the custom-tool options and how to integrate them. Answer first, then expand Show answer.

Part A · Multiple choice

Q1

Which custom-tool option is best for integrating an external REST API in a standardized way?

  • A Custom function
  • B OpenAPI specification
  • C Azure Logic Apps
  • D Azure Functions
Show answer

B — OpenAPI specification. An OpenAPI 3.0 spec standardizes the HTTP API integration.

Q2

Which option is event-driven, using triggers and bindings?

  • A Azure Functions
  • B Custom function
  • C OpenAPI
  • D Logic Apps
Show answer

A — Azure Functions. Triggers decide when it runs; bindings connect data sources.

Q3

Which option is a low/no-code way to orchestrate multiple apps and services?

  • A Custom function
  • B OpenAPI
  • C Azure Logic Apps
  • D Azure Functions
Show answer

C — Azure Logic Apps.

Q4

To register a Python function as a tool, you use:

  • A FunctionTool (name, parameter schema, description)
  • B A vector index
  • C A content filter
  • D A Logic App
Show answer

A — FunctionTool. The agent decides when to call it based on the description.

Q5

Which auth types does the OpenAPI tool support?

  • A Anonymous, API key, and managed identity
  • B Password only
  • C None
  • D Biometric
Show answer

A. Registered via OpenApiTool with the chosen auth details.

Q6

What is the key rule of the declarative tool pattern?

  • A Manually call each tool in code
  • B Describe tools well and let the agent decide when to call them
  • C Use only one tool per agent
  • D Disable tool descriptions
Show answer

B. Meaningful names and documented parameters let the agent choose autonomously.

Part B · True or false

Q7

You should manually orchestrate every custom-tool call in your code.

Show answer

False. The declarative pattern has the agent decide — you just define and register the tools.

Q8

A custom function tool supports multiple programming languages.

Show answer

True. Custom functions offer language flexibility for business logic.

Q9

Azure Functions register with an agent via an AzureFunctionTool and use input/output bindings.

Show answer

True. The agent sends requests through the specified bindings.

Q10

Well-documented parameters and names help the agent invoke tools correctly.

Show answer

True. The description is what guides the agent's decision to call.

Part C · Short answer

Q11

Name the four custom-tool options.

Show answer

Custom function, Azure Functions, OpenAPI specification, and Azure Logic Apps.

Q12

Name the three tool objects used to register custom tools.

Show answer

FunctionTool, AzureFunctionTool, and OpenApiTool.

Q13

Which option would you choose for tightly-integrated custom business logic?

Show answer

A custom function — for custom logic and language flexibility.