When setting up an agent in the Copilot Studio, one of the things we could and should be doing is providing instructions. Sometimes, we’d be using those instructions to define constraints. Well, at least that’s part of what instructions are supposed to be used for.
You can find some example here:
https://learn.microsoft.com/en-us/microsoft-copilot-studio/guidance/generative-mode-guidance
And to some extent it works. For example, I’ve added an instruction to my agent no to engage in any conversation which is not directly related to the training course, and there you go:

And that’s an expected response from the agent, since it’s just following the instructions, which are:
Do not engage in the conversations which are not related to the training course. When a user asks an unrelated question, notify the user that you can only engage in the training-related conversations
So, it’s doing what it’s been told to do, and everything looks good until it starts doing something else:

But what are those most important numbers on the screenstot above that made the agent deviate from my instructions? They are just some random numbers, to be honest, there is nothing special about the. Except that those numbers is what my custom MCP server will return for that specific question. That MCP server server was added as a tool to the agent:

So if I were to guess what happened there, it’s as if MCP tools had some sort of priority over the instructions. If there is a tool that matches… the agent will ask the tool and may continue the conversation based on the response provided by the tool no matter what the instructions are.
Not that in this particular example everything went off the rails, but my confidence level is still not too high – as in “anything can happen there”.