QuestionQ13
VerifiedImplement generative AI and agentic solutionsYou have a Microsoft Foundry project that contains an agent, and the agent has a Model Context Protocol (MCP) tool that queries a knowledge base stored in Azure AI Search.
Some agent runs return answers straight from the base model without invoking the knowledge base, so those responses lack grounded citations.
You are given the following code snippet, which runs the agent:

You need to add the correct tool_choice parameter to the code so that the agent is deterministically forced to invoke the MCP tool on every run.
What should you add?
Community Discussion