Skip to main content
Glama
sap-mcp

sap-mcp

by abap-studio

patch_bdef

Modify part of an existing behavior definition without resending the whole source by replacing an exact string once; then lock, update, unlock, and optionally activate—refused on production profiles.

Instructions

Modify PART of an existing behavior definition (BDEF) without resending the whole source. Reads the current source, replaces oldString with newString (must match EXACTLY ONCE), then locks, PUTs, unlocks, and optionally activates. 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": {
      "bdefName": "<bdefName>",
      "oldString": "<oldString>",
      "newString": "<newString>"
    },
    "name": "patch_bdef"
  }
}

Input Schema

NameRequiredDescriptionDefault
activateNoActivate after writing. Default false.
bdefNameYesBehavior definition name = its root entity, e.g. ZTJI_PLANT_EMAIL
newStringYesReplacement text
oldStringYesExact existing text to replace. Must occur exactly once - include enough context to be unique.
transportNoTransport request. Omit only for local/$TMP objects.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A4/5.0
Behavior4/5

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

With no annotations at all, the description carries the full burden and does substantial work: it discloses the read-replace-lock-PUT-unlock-activate sequence, the exactly-once match requirement, and a hard safety refusal on production profiles. It does not say what happens if the PUT or activation fails (rollback, partial state) or what permissions/transport state are needed, leaving some mutation risk undisclosed.

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

Conciseness5/5

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

Three tight sentences: purpose first, mechanism second, safety constraint last. Every clause carries information - no restatement of the name or filler.

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 five-parameter mutation tool with no annotations and no output schema, the description covers purpose, mechanism, and safety adequately. Gaps remain around failure/rollback semantics and what the tool returns after activation, but the core decision-critical information is present.

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 all five parameters including transport and activate are already documented in the schema, setting the baseline at 3. The description adds sequencing context (activate happens after the write) and reinforces the unique-match constraint on oldString, but contributes nothing about transport or bdefName naming that the schema lacks.

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

Purpose4/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 ('Modify PART of an existing behavior definition (BDEF)') and scopes it via 'without resending the whole source', which implicitly separates it from a whole-source update. It never names update_bdef or create_bdef explicitly, so sibling differentiation is inferred rather than stated.

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?

Usage context is clear: use it for partial edits when you cannot or do not want to resend the entire source, and it self-excludes on production profiles. The 'when not to use' side is covered by the production refusal, but no sibling alternative is named for the full-replacement case.

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