Skip to main content
Glama
bw-modeling-mcp

bw-modeling-mcp

by dnic-dev

bw_write_transformation

Create and modify SAP BW/4HANA transformations by defining field rules, managing Start/End/Expert routines, and setting HANA or ABAP runtime.

Instructions

Create a transformation, change the rule of a field, and set or remove its routines and runtime. The operation enum lists every operation with what it requires; bw_describe(tool: "bw_write_transformation", operation: "…") gives the complete parameter definition of one.

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": {
      "operation": "<operation>"
    },
    "name": "bw_write_transformation"
  }
}

Input Schema

NameRequiredDescriptionDefault
fieldsNoExplicit complete set of target field names the END routine should write (e.g. [set_routine_fields]
sourceNo" for ABAP routin… Full definition: bw_describe(tool: "bw_write_transformation", operation: "set_expert_routi… [set_expert_routine]
formulaNoFormula expression for rule_type="formula" (required). [update_rule]
packageNoDevelopment package. [create]
runtimeNo"hana" sets HANARuntime="true", "abap" sets HANARuntime="false". [set_runtime]
activateNoActivate the transformation in the same call (default false). [create]
operationYesOperation — one of: create: Create a new Transformation between two BW objects (aDSO, DataSource, InfoSource, etc.). Requires source_object_type, source_object_name, target_object_type, target_object_name. | update_rule: Map a source field to a target field in a Transformation, or change the type of the rule of a field — direct, time conversion, routine, formula, constant, look… Requires transformation_name, target_infoobject. | set_routine: Add a Start, End, or Expert routine to a Transformation. Requires transformation_name, routine_type. | set_expert_routine: Write the CODE of an existing Start/End/Expert routine into the Transformation MASTER so it survives TLOGO regeneration — a full bw_activate(trfn) AND a transp… Requires transformation_name. | set_routine_fields: Edit the list of target fields the global END routine writes ("Felder setzen" in SAP GUI). Requires transformation_name. | delete_routine: Remove a Start, End, or Expert routine from a Transformation. Requires transformation_name, routine_type. | set_runtime: Switch a Transformation between HANA and ABAP runtime. Requires transformation_name, runtime.
rule_typeNoRule type to assign. [update_rule]
transportNoDefined per operation — bw_describe(tool: "bw_write_transformation", operation: "…") gives each definition. [6 of 7 operations]
class_nameNoOptional override for the generated class name (e.g. [set_expert_routine]
conversionNoCurrency or unit conversion for a direct rule on a key figure with a currency or unit (rule_type="direct"). [update_rule]
aggregationNoAggregation type of the rule on a target key figure: "SUM" (summation), "MOV" (overwrite), "MIN", "MAX" or "N… [update_rule]
method_nameNoOptional override for the routine method name (e.g. [set_expert_routine]
routine_typeNoDefined per operation — bw_describe(tool: "bw_write_transformation", operation: "…") gives each definition. [set_routine, set_expert_routine, delete_routine]
source_fieldNog. [update_rule]
lookup_objectNoName of the InfoObject or aDSO to read from (Nachlese-Objekt). [update_rule]
source_systemNoSource system name. [create]
constant_valueNoConstant value for rule_type="constant" (required). [update_rule]
exclude_fieldsNoTarget fields to exclude from the END routine — all other target fields are written. [set_routine_fields]
target_infoobjectNoTarget InfoObject name in the target segment (e.g. [update_rule]
unit_source_fieldNoSource unit/currency field for a COMBINED key-figure + unit/currency direct rule (rule_type="direct"). [update_rule]
lookup_key_mappingNog. [update_rule]
lookup_object_typeNoType of the lookup object. [update_rule]
source_object_nameNoTechnical name of the source object. [create]
source_object_typeNoSource object type. [create]
target_object_nameNoTechnical name of the target object. [create]
target_object_typeNoTarget object type. [create]
transformation_nameNoTransformation name (UUID-like key). [6 of 7 operations]
source_object_subtypeNoInfoObject sub-type of the source. [create]
target_object_subtypeNoInfoObject sub-type of the target. [create]
additional_source_fieldsNoAdditional source fields for rule_type="formula" and "routine". [update_rule]
copy_from_transformationNoTechnical name of an existing Transformation to copy rules from. [create]

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv2.0.0

TDQS

B3.4/5.0
Behavior3/5

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

With no annotations, the description carries the full burden. It discloses the mutation surface (create, change rules, set and remove routines, switch runtime) and implicitly signals destructive capability via 'remove'. It does not state permission requirements, reversibility, activation/regeneration side effects, or what the call returns — gaps that matter for a write tool.

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?

Two sentences, front-loaded with what the tool does, followed by the operational how-to. No wasted wording. It is lean but arguably under-explains rather than over-explains.

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

Completeness3/5

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

For a 32-parameter, seven-operation mutation tool with no output schema, delegating detail to the operation enum and bw_describe is a defensible strategy and keeps the description honest. But it leaves out activation prerequisites, expected effects on the Transformation master, and any success/failure signaling, which an agent needs before invoking a write.

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 32 parameters with per-operation tags. The description's only added value is pointing the agent to bw_describe for a single operation's complete definition and noting the enum lists per-operation requirements. That is a useful pointer but adds no syntax or constraint detail itself.

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 names specific verbs and a specific resource — create a Transformation, change a field's rule, set/remove routines and runtime — so the resource is unmistakable against siblings like bw_write_adso or bw_write_dtp. It stops short of explicitly contrasting with those siblings, which keeps it off a 5.

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

Usage Guidelines3/5

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

It gives a usable procedure: pick the operation from the enum, then call bw_describe for that operation's full parameter set. That is real guidance on how to drive the tool. However, there is no when-not guidance, no prerequisites (e.g. that changes likely need activation), and no routing to sibling write tools for non-transformation objects.

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