SAPinsider

articles

How to Write MCP Agent Instructions for SAP: A Practical Guide

How to Write MCP Agent Instructions for SAP: A Practical Guide

Imagine an AI agent triggering an SAP personnel action. The request is simple: “Execute a salary change for employee Jane Doe effective July 1st.” Yet the transaction fails or returns an incorrect result - not because the model misunderstood the task, but because it didn’t know how to format the date in a way SAP can process.

When agents make mistakes, the underlying model often gets the blame. But the problem usually lies in the instructions.  AI agents rely on descriptions to decide which tool to use and how to populate its parameters. If those descriptions are incomplete or ambiguous, even the best model will produce unreliable results.  When it comes to SAP and MCP, success is often determined not by the AI itself, but by the quality of the guidance it receives.

The cost of getting this wrong is high: unreliable agents slow down processes, generate errors in critical SAP transactions, and quietly undermine confidence in AI initiatives across the organization. Get it right, and AI agents become a reliable extension of your SAP processes. Executing transactions, retrieving data, and supporting decisions with consistency and control. Here's what makes the difference: three layers of documentation that turn an unpredictable agent into a reliable one. And it doesn't require a platform migration or new infrastructure to get there.

‍

The Three Layers of Effective Agent and MCP Documentation

The success of AI-driven SAP interactions through MCP depends less on the model itself and more on the quality of the instructions and descriptions surrounding it. In practice, there are three layers of documentation that make the difference between reliable automation and unpredictable results:

  • The system prompt tells an agent how to act and how to use the MCP server.

  • The tool descriptions exposed by the MCP server and used by the agent to map user intent to specific tools.

  • The parameter descriptions used to correctly pass user input to a tool.

How does an MCP server work?

‍

Layer 1: How to Write a System Prompt for an MCP Agent

A system prompt is a set of instructions given to an agent before it interacts with a user. It defines the agent's role, behaviour, capabilities, constraints, and goals. Vague descriptions, missing negative examples, and unaddressed edge cases are common sources for mistakes. An agent that uses an MCP server to interact with SAP should include the following instructions:

  • If the agent is dedicated to SAP-related tasks or acts as a specialized sub-agent, assign a clear persona and scope. Example: “You are an SAP execution agent that uses the MCP server to access SAP data. You retrieve business data from SAP, execute SAP transactions, create and update SAP records, and provide insights based on SAP information. You are strict, accurate, and safety focused. SAP is a critical transactional system; correctness and control are mandatory.”

Vendors mentioned

Fill in the form on this page to read the full article.