Skip to main content
Glama
sap-mcp

sap-mcp

by abap-studio

create_enho

Creates and activates SAP hook enhancement implementations (ENHO/XHH) from ENHANCEMENT source blocks, refusing production profiles and requiring a transport unless the package is $TMP.

Instructions

Create a new hook Enhancement Implementation (ENHO/XHH) in SAP and activate it. Refuses to run on production profiles. The source must contain at least one ENHANCEMENT block. Example: 'ENHANCEMENT 1 <enho_name>. " code ENDENHANCEMENT.' For BAdI implementations (ENHO/XHB) create the implementing class instead. Needs a transport unless package is $TMP.

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": {
      "enhoName": "<enhoName>",
      "description": "<description>",
      "packageName": "<packageName>",
      "source": "<source>"
    },
    "name": "create_enho"
  }
}

Input Schema

NameRequiredDescriptionDefault
sourceYesComplete ENHO source with ENHANCEMENT...ENDENHANCEMENT blocks
activateNoActivate after writing the source
enhoNameYesEnhancement implementation name, e.g. ZEH_MY_HOOK
transportNoTransport request. Omit only for $TMP.
descriptionYesShort description
packageNameYesPackage, e.g. ZABAP. Use $TMP for a local throwaway.

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 full burden and does well: it discloses that activation happens as a side effect, that production profiles are rejected, that the source must contain at least one ENHANCEMENT block, and that a transport is mandatory unless the package is $TMP. What is not disclosed is the failure mode — whether a failed activation leaves an inactive object behind or rolls back the create.

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?

Four sentences, all front-loaded with the main action first, then constraints, then the alternative. The inline source example is compressed and slightly awkward to parse, but it earns its place because the block syntax is a hard requirement. No filler sentences.

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 object-creating tool with no output schema and no annotations, this covers the preconditions (production refusal, source shape, transport) and the alternate route for BAdI objects. The main gap is the return value — the agent is not told whether the response contains the created object name or an activation status, which matters for chaining into get_enho_source.

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 baseline is 3; the description does not need to re-explain the parameters. It adds some real meaning — the required ENHANCEMENT...ENDENHANCEMENT source shape plus a concrete syntax example, and the $TMP/transport coupling — but says nothing extra about activate, enhoName naming constraints, or description.

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?

States a specific verb and resource ('Create a new hook Enhancement Implementation (ENHO/XHH)') and names the distinct object type it produces, so an agent can separate it from patch_enho/update_enho without opening the schema. It also carves out the BAdI variant (ENHO/XHB) as a different path, which further sharpens the identity of this tool.

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?

Gives explicit when-not conditions: refuses on production profiles, and for BAdI implementations the agent is routed to 'create the implementing class instead'. It also states the transport prerequisite up front. It stops short of naming the exact sibling tool (create_class) and gives no guidance on choosing between create_enho and patch_enho/update_enho for existing objects.

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