Skip to main content
Glama
sap-mcp

sap-mcp

by abap-studio

patch_message_class

Create or update one numbered message in an existing SAP Message Class, optionally activate it, and write directly through ADT with production write protection.

Instructions

Add or update ONE numbered message (T100 text) in an existing Message Class, then optionally activate. Writes directly to that message's own sub-resource - confirmed against the ADT discovery document (/sap/bc/adt/messageclass/{name}/messages/{msgno}), the same endpoint the atom:link on a GET of the class points to for each message. PUT is an upsert: works whether the number already exists or not. Use &1 &2 &3 &4 in text as placeholders for MESSAGE ... WITH values. Refuses to run on production profiles.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "messageClassName": "<messageClassName>",
      "msgno": "<msgno>",
      "text": "<text>"
    },
    "name": "patch_message_class"
  }
}

Input Schema

NameRequiredDescriptionDefault
textYesMessage text, max 73 chars. Use &1 &2 &3 &4 for placeholders.
msgnoYesMessage number, e.g. '001' (zero-padded to 3 digits automatically)
activateNoActivate after writing
transportNoTransport request. Omit only for $TMP.
selfExplanatoryNoWhether the message is self-explanatory (no long text needed)
messageClassNameYesMessage class name, e.g. ZCL_MY_MESSAGES

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A4.1/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries the burden and discloses important behavior beyond the schema: direct writes to the message sub-resource, upsert behavior, placeholder syntax, optional activation, and that production profiles are refused. It omits error/return behavior, but the key operational risks are covered.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The definition is front-loaded with the action and scope, then adds upsert behavior and safeguards. The ADT discovery-document justification is somewhat verbose for an agent-facing description, but it supports correctness rather than adding noise.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a six-parameter mutation tool with no annotations and no output schema, the description covers the essential operational context: single-message scope, upsert behavior, activation, placeholders, and production refusal. It could say more about failure modes or response expectations, but it is complete enough to call correctly.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the schema already documents all six parameters in detail. The description reinforces the placeholder syntax and upsert semantics but adds little parameter-level meaning beyond what the schema provides.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states a specific verb and resource: 'Add or update ONE numbered message (T100 text) in an existing Message Class,' and distinguishes this from sibling patch_class and create_message_class by emphasizing a single numbered message and an existing class.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It gives clear context for use: one message at a time inside an existing Message Class, PUT upsert semantics, optional activation, and a production-profile refusal. It does not explicitly name alternatives such as patch_class, but the scope constraint is strong enough for an agent to choose correctly.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.