Dynamics 365 Consultant Assistant: A custom agent that helps with Dynamics 365 Tech consultations using MS Learn MCP Server
Introduction
The Dynamics 365 Assistant serves as a dedicated agent designed to support Dynamics consultants in their daily work. Its core functions include assisting with system setups, offering guidance for configurations, and helping consultants address a range of use cases and business requirements associated with Dynamics 365. The assistant is especially focused on the Dynamics 365 Finance & Operations (F&O) module, providing consultants with targeted and effective support tailored to their needs.
Agent Architecture using MCP Tool (Microsoft Doc)
Image credit: Microsoft Learn
Dynamics 365 Consultant Agents Architecture
The architecture of the Dynamics 365 Assistant is designed to deliver specialized support to consultants. Through the use of dedicated tools and clearly defined instructions, the system enables consultants to complete their tasks more efficiently within Dynamics 365. This approach ensures that both technical and business needs are met, with a particular emphasis on Finance & Operations.
System Prompt: Agent Instructions
A key element of the agent’s architecture is the system prompt, which determines the agent’s behavior. The instructions given to the agent are carefully structured, outlining its role and operational guidelines. This template ensures that the agent interacts consistently and maintains reliable performance throughout its use.
Dynamics 365 Consultant Agent's Instruction Template
The instruction template acts as a blueprint for guiding the agent’s behavior and clarifying its role within the Dynamics 365 environment. By adhering to this structured approach, the Dynamics 365 Assistant reliably supports consultants, ensuring its actions align with organizational goals and user requirements. The agent instruction template was used as a guide to generate a well craft and precise instruction for the Dynamics365 Consultant Assistant to follow.
You can use this template to craft your own instruction. Instruction contents can vary, what matters is the semantic understanding.
Agent´s Instruction Template.
MCP Server: Microsoft Learn MCP Server
The Microsoft Learn MCP Server is a vital component that enables clients such as GitHub Copilot and other AI agents to access trusted, current information from Microsoft’s official documentation. Functioning as a remote MCP server through streamable HTTP, it facilitates searching documentation, retrieving full articles, and finding code samples on the Microsoft Learn platform.
The Microsoft Learn MCP Server has 3 major tools exposed:
Agent Tools:
- microsoft_docs_search: Performs semantic search against Microsoft official technical documentation.
- microsoft_docs_fetch: Fetch and convert a Microsoft documentation page into markdown format.
- microsoft_code_sample_search: Search for official Microsoft/Azure code snippets and examples.
Dynamics 365 Consultant Agent Creation Process
The Dynamics 365 Consultant Assistant was created using Microsoft Foundry, a platform that requires an Azure subscription. For further details on agent creation, refer to previous post about setting up agents in Microsoft Foundry.
The process begins with the creation of MCP tools on Foundry. After setting up these tools, the agent is created,agent instructions are specified, and the tool is connected to the agent.
The agent can then be previewed, tested, and published to an endpoint for access by others.
Testing the Agent
Once the agent is created and configured, it undergoes testing to ensure that it operates as intended and supports consultants effectively in their Dynamics 365 tasks.




Comments
Post a Comment