Skip to main content
Glama
sap-mcp

sap-mcp

by abap-studio

create_bdef

Creates and activates a Behavior Definition (BDEF) in an SAP S/4HANA system from full source, enforcing production safety and existing root entity, persistent table, and class prerequisites.

Instructions

Create a new Behavior Definition (BDEF) in SAP and activate it. Refuses to run on production profiles. bdefName must equal the root entity the behavior is for, and that entity must already exist. Provide the complete source (e.g. 'managed implementation in class unique; define behavior for ... { ... }'). A managed BDEF needs its persistent table + implementation class to exist for activation to succeed. 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": {
      "bdefName": "<bdefName>",
      "description": "<description>",
      "packageName": "<packageName>",
      "source": "<source>"
    },
    "name": "create_bdef"
  }
}

Input Schema

NameRequiredDescriptionDefault
sourceYesComplete BDEF source (define behavior for <entity> ... { ... })
activateNoActivate after writing the source
bdefNameYesBehavior definition name = the root entity it is defined for, e.g. ZKIT_R_PRODUCT.
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

A3.9/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 substantial work: it discloses that execution is refused on production profiles, that activation occurs after writing source, and that activation can fail unless the table and class exist. It stops short of describing failure semantics (partial write vs atomic rollback) or what the response contains.

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?

Purpose is front-loaded in the first sentence, followed by ordered prerequisite constraints, and every sentence carries a distinct rule. It is dense but not padded; the inline source example is justified because the source format is the hardest part to get right.

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, this is fairly complete: it covers naming constraints, prerequisites, activation side effects, production refusal, and transport rules. It leaves the return/result and error behavior unstated, which an agent would need when deciding how to react to a failed activation.

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 coverage is 100%, so the schema already documents all six parameters and the baseline is 3. The description adds some genuine meaning beyond it, notably that bdefName must equal the root entity it defines behavior for and that transport may be omitted only for $TMP, but it largely restates what the schema strings already convey.

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 opens with a specific verb and resource ('Create a new Behavior Definition (BDEF) in SAP and activate it'), making the create-plus-activate scope unambiguous. It does not name the sibling it contrasts with (patch_bdef/update_bdef), so the agent must infer create-vs-modify from the verb alone.

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?

Preconditions for legitimate use are spelled out clearly: the root entity must already exist, a managed BDEF needs its persistent table and implementation class, and a transport is required unless the package is $TMP. What is missing is explicit routing guidance (e.g. 'use update_bdef for existing definitions'), so the agent must infer when this tool stops applying.

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