Skip to main content
Glama
sap-mcp

sap-mcp

by abap-studio

update_enho

Replace the entire source of an existing hook enhancement implementation (ENHO/XHH), with locking, optional activation, and production safety. Read source first and use patch_enho for small edits.

Instructions

Overwrite the source of an EXISTING hook Enhancement Implementation (ENHO/XHH). Locks, PUTs the whole new source, unlocks, then optionally activates. Refuses to run on production profiles. REPLACES the whole source - read it first with get_enho_source and send the complete result back. Prefer patch_enho for small edits. For BAdI implementations use update_class on the implementing class.

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>",
      "source": "<source>"
    },
    "name": "update_enho"
  }
}

Input Schema

NameRequiredDescriptionDefault
sourceYesComplete new ENHO source - REPLACES the entire implementation
activateNoActivate after writing. Default false.
enhoNameYesEnhancement implementation name, e.g. ZEH_MY_HOOK
transportNoTransport request. Omit only for local/$TMP objects.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A4.5/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 so well: it discloses the lock/PUT/unlock sequence, the production-profile refusal, the optional activation step, and that the whole source is replaced. It stops short of describing failure/rollback behavior or whether prior source versions are retained, which matters for a destructive mutation.

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?

Five compact sentences, front-loaded with the action and the destructive replacement warning before the workflow and alternatives. The capitalization of 'REPLACES' and 'EXISTING' is emphasis rather than waste, though 'Overwrite' and 'REPLACES the whole source' are slightly redundant.

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 mutation tool with no annotations and no output schema, the definition covers the destructive semantics, the read-before-write workflow, the production guard, and sibling alternatives. It leaves error/rollback behavior and the return value unspecified, which is a minor gap given no output schema exists.

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

Parameters4/5

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

Schema coverage is 100%, so the baseline is 3. The description adds real meaning beyond the schema by stressing that 'source' must be the complete implementation and should be obtained via get_enho_source, and by noting activation is optional — clarifying intent rather than merely restating field descriptions.

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 — overwrite the source of an EXISTING hook Enhancement Implementation (ENHO/XHH) — and explicitly disambiguates from sibling tools (patch_enho for small edits, update_class for BAdI implementations). An agent can identify both the action and the target object type without opening the schema.

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

Usage Guidelines5/5

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

Gives explicit routing rules: read first with get_enho_source, prefer patch_enho for small edits, use update_class for BAdI implementations, and the tool refuses to run on production profiles. When-to-use, when-not-to-use, and the prerequisite read step are all named.

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