Courseiva

AI-102 Implement agentic AI solutions Practice Question

A retail company is creating an Azure AI Foundry agent that helps customers find products. The agent must be able to call a product search API and a store inventory API. The team wants to define these capabilities so the agent can invoke them when needed. What should the team do?

⚠ Common exam trap

The trap here is assuming the agent can call APIs by simply mentioning them in the prompt, rather than defining them as tools with proper schemas.

Answer choices

Why each option matters

Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.

Correct answer & explanation

✓

Add the two APIs as tools in the agent definition, providing their OpenAPI schemas.

The team needs to enable the agent to call two external APIs. In Azure AI Foundry, tools are the mechanism for integrating external services. By adding each API as a tool with its OpenAPI schema, the agent gains the ability to invoke them with correct parameters and handle responses. This is the native, supported approach and requires minimal custom code.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • ✗

    Embed the API endpoints in the agent's system message and instruct the model to call them by using HTTP requests.

    Why it's wrong here

    Language models cannot directly make HTTP requests. Embedding endpoints in the system message does not provide a mechanism for the agent to execute calls, and it may expose sensitive URLs. This approach is not supported by the agent runtime and would not result in reliable API invocation. Tools are the correct abstraction for external calls.

  • ✗

    Use the agent's built-in code interpreter to write Python code that calls the APIs.

    Why it's wrong here

    The code interpreter is intended for data analysis and code execution, not for making authenticated API calls as part of the agent's core capabilities. It may not have network access or credential management. Using it for API calls is indirect and less reliable than defining tools, which are purpose-built for this integration.

  • ✗

    Create an Azure Function for each API and configure the agent to use them as skills.

    Why it's wrong here

    While Azure Functions can wrap APIs, the term 'skills' is not the current abstraction in Azure AI Foundry agents. Adding tools directly with OpenAPI schemas is simpler and avoids unnecessary compute. This approach adds overhead and does not align with the native tool integration, which is designed for exactly this scenario.

  • ✓

    Add the two APIs as tools in the agent definition, providing their OpenAPI schemas.

    Why this is correct

    Azure AI Foundry agents use tools to interact with external services. By adding the APIs as tools with their OpenAPI schemas, the agent can understand the available operations, parameters, and responses, and invoke them when appropriate. This is the standard way to extend an agent's capabilities with custom APIs.

About these practice questions

One of 761 original AI-102 practice questions on Courseiva, each with a full explanation and wrong-answer analysis — not exam dumps or protected exam content. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

JA

Written and reviewed by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

Last reviewed September 2026 · checked against the official Microsoft exam blueprint

This AI-102 practice question is part of Courseiva's free Microsoft certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the AI-102 exam.