EPISODE 2: THE CAST: INSTRUCTIONS, MODELS AND TOOLS

Before we start creating our agents, let’s look at the components and how they help us:

These are the rules or the expected behavior guide for the agent: goal, scope, tone, what it prioritizes (and what it must not do), how to ask for context, and how to validate before acting.

They tell the agent what to do and how to do it using natural-language statements.

They can also provide the agent with the context it needs to improve agentic orchestration. This is very important so the agent can understand, basically, what we mean when we talk about what we talk about. In other words, if we specify in the instructions that the agent is responsible for Accounts Payable, and we ask it to “review the accounts,” we’re talking about vendors and all actions related to that module. In another context, “account” could refer to customers or general ledger accounts.

In the Microsoft documentation there’s an example we can use, but here’s how I write or structure them:

Role: we need to tell the agent who it is, what role/profile it has in the organization. For example:
Act as a Smart Collections Agent supporting finance and accounts receivable teams.

Goal: what we need it for. If we’re creating an agent, we have to indicate…
Help prioritize collection activities based on risk, aging, and impact on cash flow. Support decision-making by highlighting relevant insights. Analyze all the information related to customers, credit and collections.

Instructions: how to achieve the goal we’re asking for.
Review customer information in the system related to collections and credit management. Consider recent payment behavior and collection status to identify potential risks. Provide a consolidated view of customer exposure across companies when applicable.

This is the reasoning and language engine. The agent uses it to:

  1. Understand what we’re asking it to do
  2. Orchestrate: decide whether to respond directly or fetch information from knowledge, topics, or tools (which tools to use and in what sequence).
  3. Call tools and fill in parameters (including menu parameters)
  4. Draft the final response in the tone/structure defined in the instructions

When you connect the Dynamics 365 ERP MCP, the model is the one that “drives” the interaction after receiving the prompt:

  • It reads your instructions
  • It interprets the request and decides which MCP tool to call (for example, open a form and filter a grid)
  • It uses the dynamic context returned by MCP (security, available actions, view model) to know what it can do at that moment

So, the MCP provides tools and FnO context; the model decides and executes the sequence.

The model does not have access to your ERP data by itself: it gets it through tools.

Microsoft recommends Claude Sonnet 4.5 as the model for agents that use the Dynamics 365 ERP MCP.

Claude Sonnet 4.5 is a language model designed for scenarios where an agent must follow instructions precisely and coordinate multi-step interactions, especially when it needs to use tools. It’s a hybrid reasoning model that can run in standard mode or enable “extended thinking” when a task requires deeper reasoning. It also allows keeping a lot of information within the same conversation.

NOTE: To use an Anthropic model, we first need to enable external LLMs, I’ll show you how in the next blog 😉. If it’s not available, or in the meantime, you can use GPT-5 (Chat) as an alternative.

Tools are the capabilities the agent can invoke to work with FnO.

In the Dynamics 365 ERP MCP, these tools were designed so the agent can perform tasks by navigating and interacting with forms: opening screens, setting values in fields, applying filters, and executing actions available within the same form.

That means the agent operates on data and business logic following the same pattern as a user in the system, just through continuous tool calls.

The value of this approach is that you don’t rely on “closed” tools to perform specific actions (for example, “get a customer balance doing click here”), but rather on a small set of generic interaction tools (open, filter, select, save, invoke actions) to move through the application and act based on what’s available on each screen. And that’s exactly what makes our MCP so powerful.

There’s also an important point: when we connect the Dynamics 365 ERP MCP tool, we must choose which security context the agent will use: either the connector security (the user we used to connect the tool) or the requesting user’s security (the user who is asking for the action / speaking with the agent).

If we select user security, it ensures that every time the agent accesses the system, it can only see forms, data, and execute actions that the user is allowed to. If the agent explicitly tries to invoke an action or object outside the user’s permissions, the system rejects it.

The Dynamics 365 ERP MCP exposes, among others, these main tools:

ToolDescription
open_menu_itemOpens a menu item.
find_menu_itemSearches for a menu item accessible for the role.
filter_form / filter_gridApplies filters in a form or grid.
sort_grid_columnSorts a grid by a column.
select_grid_rowSelects a row in a grid.
open_lookupOpens a lookup.
set_control_valueSets a value in a field/control.
click_controlSelects a control (or sub-element).
open_or_close_tabOpens or closes form tabs.
find_actionsDiscovers available actions to invoke.
invoke_actionInvokes an action.
save_formSaves changes on the form.
close_formCloses the form.

🌱 HOW IT ALL RELATES TO THE FnO MCP

So we connect everything as a chain:

I hope you’re getting to know each character, because in the next episode we’ll open the door for real: Episode 3: Unlocking the Door: Enabling the MCP Server 👉🏻


Deja un comentario