Skip to main content
Glama
bw-modeling-mcp

bw-modeling-mcp

by dnic-dev

Create and change transformations

bw_write_transformation
Destructive

Create and modify SAP BW/4HANA transformations: define field rules, add or remove routines, set runtime, and manage rule groups for data flow mappings.

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
groupNoThe rule group to rename, remove or change a rule in: its description or its id. [rule_group]
actionNoWhat to do with the rule group. [rule_group]
fieldsNoExplicit complete set of target field names the END routine should write (e.g. ["FIELD_A", "FIELD_B"]). [set_routine_fields]
sourceNoThe complete routine method block: "METHOD <NAME> BY DATABASE PROCEDURE … ENDMETHOD." for AMDP (HANA) routine… [set_expert_routine]
targetNoFor use_standard_rule: the target field whose rule follows the standard group again (e.g. "FIELD_NAME"). [rule_group]
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 field list of a global routine: the target fields the END routine writes (default), or with routine_type "start" the source fields the START routine r… 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. | update_settings: Change the settings of a Transformation that are not rules: its switches, the options of single target fields, and the fields the extraction is grouped by. Requires transformation_name. | rule_group: Add, rename or remove a rule group of a Transformation, or list its groups. Requires transformation_name, action.
rule_typeNoRule type to assign. [update_rule]
transportNoDefined per operation — bw_describe(tool: "bw_write_transformation", operation: "…") gives each definition. [8 of 9 operations]
class_nameNoOptional override for the generated class name (e.g. "/BIC/<uuid>_M"). [set_expert_routine]
conversionNoCurrency or unit conversion for a rule on a key figure with a currency or unit; goes with rule_type="direct",… [update_rule]
rule_groupNoThe rule group whose rule is changed, by its description or id; omitted: the standard group. [update_rule]
aggregationNoAggregation type of the rule on a target key figure: "SUM" (summation), "MOV" (overwrite), "MIN", "MAX" or "N… [update_rule]
descriptionNoThe name of the new rule group (add), or the new name of the group (rename). [rule_group]
method_nameNoOptional override for the routine method name (e.g. a field-routine method). [set_expert_routine]
routine_typeNoDefined per operation — bw_describe(tool: "bw_write_transformation", operation: "…") gives each definition. [4 of 9 operations]
source_fieldNoSource field name in the source segment (e.g. "FIELD_NAME"). [update_rule]
lookup_objectNoName of the InfoObject or aDSO to read from. [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_optionsNoOptions of single target fields; only the properties given for a field change. [update_settings]
lookup_time_valueNoFor lookup_time_dependency "constant_date": the date as YYYYMMDD. [update_rule]
target_infoobjectNoTarget InfoObject name in the target segment (e.g. "IOBJ_NAME"). [update_rule]
unit_source_fieldNoSource unit/currency field for a COMBINED key-figure + unit/currency direct rule (rule_type="direct"). [update_rule]
lookup_key_mappingNoFor rule_type="lookup": which source field feeds each key field of the lookup object (key field → source fiel… [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). [8 of 9 operations]
lookup_error_constantNoThe value the target gets when the lookup finds nothing; needs lookup_error_handling "constant". [update_rule]
lookup_error_handlingNoFor rule_type="lookup" into a DataStore object: what happens when no record is found. [update_rule]
semantic_group_fieldsNoComplete list of source fields the extraction is grouped by (e.g. ["FIELD_A", "FIELD_B"]); [] removes the gro… [update_settings]
source_object_subtypeNoInfoObject sub-type of the source. [create]
target_object_subtypeNoInfoObject sub-type of the target. [create]
initialize_null_valuesNoTurn null values of the source into initial values. [update_settings]
lookup_time_dependencyNoFor rule_type="lookup" into an InfoObject with time-dependent attributes: the key date the attribute is read… [update_rule]
enable_inverse_routinesNoAllow inverse routines for the routines of this transformation. [update_settings]
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]
error_handling_in_routinesNoAllow routines to report erroneous records to the error handling of the DTP. [update_settings]
allow_currency_unit_conversionNoCurrency and unit handling of the transformation. [update_settings]

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed30 schema fields changedv2.1.1
    • addedInput schema / properties / action
      Added value: +{
      +  "description": "What to do with the rule group. [rule_group]",
      +  "enum": [
      +    "list",
      +    "add",
      +    "rename",
      +    "remove",
      +    "use_standard_rule"
      +  ],
      +  "type": "string"
      +}
    • addedInput schema / properties / allow_currency_unit_conversion
      Added value: +{
      +  "description": "Currency and unit handling of the transformation. [update_settings]",
      +  "type": "boolean"
      +}
    • changedInput schema / properties / class_name / description
      Previous value: -"Optional override for the generated class name (e.g. [set_expert_routine]"New value: +"Optional override for the generated class name (e.g. \"/BIC/<uuid>_M\"). [set_expert_routine]"
    • changedInput schema / properties / conversion / description
      Previous value: -"Currency or unit conversion for a direct rule on a key figure with a currency or unit (rule_type=\"direct\"). [update_rule]"New value: +"Currency or unit conversion for a rule on a key figure with a currency or unit; goes with rule_type=\"direct\",… [update_rule]"
    • addedInput schema / properties / description
      Added value: +{
      +  "description": "The name of the new rule group (add), or the new name of the group (rename). [rule_group]",
      +  "type": "string"
      +}
    • addedInput schema / properties / enable_inverse_routines
      Added value: +{
      +  "description": "Allow inverse routines for the routines of this transformation. [update_settings]",
      +  "type": "boolean"
      +}
    • addedInput schema / properties / error_handling_in_routines
      Added value: +{
      +  "description": "Allow routines to report erroneous records to the error handling of the DTP. [update_settings]",
      +  "type": "boolean"
      +}
    • changedInput schema / properties / fields / description
      Previous value: -"Explicit complete set of target field names the END routine should write (e.g. [set_routine_fields]"New value: +"Explicit complete set of target field names the END routine should write (e.g. [\"FIELD_A\", \"FIELD_B\"]). [set_routine_fields]"
    • addedInput schema / properties / group
      Added value: +{
      +  "description": "The rule group to rename, remove or change a rule in: its description or its id. [rule_group]",
      +  "type": "string"
      +}
    • addedInput schema / properties / initialize_null_values
      Added value: +{
      +  "description": "Turn null values of the source into initial values. [update_settings]",
      +  "type": "boolean"
      +}
    • addedInput schema / properties / lookup_error_constant
      Added value: +{
      +  "description": "The value the target gets when the lookup finds nothing; needs lookup_error_handling \"constant\". [update_rule]",
      +  "type": "string"
      +}
    • addedInput schema / properties / lookup_error_handling
      Added value: +{
      +  "description": "For rule_type=\"lookup\" into a DataStore object: what happens when no record is found. [update_rule]",
      +  "enum": [
      +    "error_message",
      +    "constant"
      +  ],
      +  "type": "string"
      +}
    • changedInput schema / properties / lookup_key_mapping / description
      Previous value: -"g. [update_rule]"New value: +"For rule_type=\"lookup\": which source field feeds each key field of the lookup object (key field → source fiel… [update_rule]"
    • changedInput schema / properties / lookup_object / description
      Previous value: -"Name of the InfoObject or aDSO to read from (Nachlese-Objekt). [update_rule]"New value: +"Name of the InfoObject or aDSO to read from. [update_rule]"
    • addedInput schema / properties / lookup_time_dependency
      Added value: +{
      +  "description": "For rule_type=\"lookup\" into an InfoObject with time-dependent attributes: the key date the attribute is read… [update_rule]",
      +  "enum": [
      +    "current_date",
      +    "constant_date",
      +    "start",
      +    "end"
      +  ],
      +  "type": "string"
      +}
    • addedInput schema / properties / lookup_time_value
      Added value: +{
      +  "description": "For lookup_time_dependency \"constant_date\": the date as YYYYMMDD. [update_rule]",
      +  "type": "string"
      +}
    • changedInput schema / properties / method_name / description
      Previous value: -"Optional override for the routine method name (e.g. [set_expert_routine]"New value: +"Optional override for the routine method name (e.g. a field-routine method). [set_expert_routine]"
    • changedInput schema / properties / operation / description
      Previous value: -"Operation — 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."New value: +"Operation — 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 field list of a global routine: the target fields the END routine writes (default), or with routine_type \"start\" the source fields the START routine r… 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. | update_settings: Change the settings of a Transformation that are not rules: its switches, the options of single target fields, and the fields the extraction is grouped by. Requires transformation_name. | rule_group: Add, rename or remove a rule group of a Transformation, or list its groups. Requires transformation_name, action."
    • changedInput schema / properties / operation / enum
      Previous value: -[
      -  "create",
      -  "update_rule",
      -  "set_routine",
      -  "set_expert_routine",
      -  "set_routine_fields",
      -  "delete_routine",
      -  "set_runtime"
      -]New value: +[
      +  "create",
      +  "update_rule",
      +  "set_routine",
      +  "set_expert_routine",
      +  "set_routine_fields",
      +  "delete_routine",
      +  "set_runtime",
      +  "update_settings",
      +  "rule_group"
      +]
    • changedInput schema / properties / routine_type / description
      Previous value: -"Defined per operation — bw_describe(tool: \"bw_write_transformation\", operation: \"…\") gives each definition. [set_routine, set_expert_routine, delete_routine]"New value: +"Defined per operation — bw_describe(tool: \"bw_write_transformation\", operation: \"…\") gives each definition. [4 of 9 operations]"
    • addedInput schema / properties / rule_group
      Added value: +{
      +  "description": "The rule group whose rule is changed, by its description or id; omitted: the standard group. [update_rule]",
      +  "type": "string"
      +}
    • changedInput schema / properties / rule_type / enum
      Previous value: -[
      -  "direct",
      -  "time",
      -  "routine",
      -  "formula",
      -  "constant",
      -  "lookup",
      -  "no_update"
      -]New value: +[
      +  "direct",
      +  "time",
      +  "routine",
      +  "formula",
      +  "constant",
      +  "lookup",
      +  "no_update",
      +  "odq_mode"
      +]
    • addedInput schema / properties / semantic_group_fields
      Added value: +{
      +  "description": "Complete list of source fields the extraction is grouped by (e.g. [\"FIELD_A\", \"FIELD_B\"]); [] removes the gro… [update_settings]",
      +  "items": {
      +    "type": "string"
      +  },
      +  "type": "array"
      +}
    • changedInput schema / properties / source / description
      Previous value: -"\" for ABAP routin… Full definition: bw_describe(tool: \"bw_write_transformation\", operation: \"set_expert_routi… [set_expert_routine]"New value: +"The complete routine method block: \"METHOD <NAME> BY DATABASE PROCEDURE … ENDMETHOD.\" for AMDP (HANA) routine… [set_expert_routine]"
    • changedInput schema / properties / source_field / description
      Previous value: -"g. [update_rule]"New value: +"Source field name in the source segment (e.g. \"FIELD_NAME\"). [update_rule]"
    • addedInput schema / properties / target
      Added value: +{
      +  "description": "For use_standard_rule: the target field whose rule follows the standard group again (e.g. \"FIELD_NAME\"). [rule_group]",
      +  "type": "string"
      +}
    • changedInput schema / properties / target_infoobject / description
      Previous value: -"Target InfoObject name in the target segment (e.g. [update_rule]"New value: +"Target InfoObject name in the target segment (e.g. \"IOBJ_NAME\"). [update_rule]"
    • addedInput schema / properties / target_options
      Added value: +{
      +  "description": "Options of single target fields; only the properties given for a field change. [update_settings]",
      +  "items": {
      +    "type": "object"
      +  },
      +  "type": "array"
      +}
    • changedInput schema / properties / transformation_name / description
      Previous value: -"Transformation name (UUID-like key). [6 of 7 operations]"New value: +"Transformation name (UUID-like key). [8 of 9 operations]"
    • changedInput schema / properties / transport / description
      Previous value: -"Defined per operation — bw_describe(tool: \"bw_write_transformation\", operation: \"…\") gives each definition. [6 of 7 operations]"New value: +"Defined per operation — bw_describe(tool: \"bw_write_transformation\", operation: \"…\") gives each definition. [8 of 9 operations]"
  2. Addedv2.0.0

TDQS

A3.5/5.0
Behavior3/5

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

Annotations already declare destructiveHint=true, readOnlyHint=false and idempotentHint=false, so the agent knows this mutates and can remove things. The description adds only that routines and runtime can be removed and that each operation has its own required parameters; it does not disclose that changes typically require a separate activation, that set_expert_routine triggers a TLOGO regeneration/activation, or anything about transport handling.

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?

Two sentences: the first front-loads the capability, the second front-loads the discovery mechanism (operation enum, then bw_describe). Nothing is repeated from the schema and there is no filler.

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 47-parameter, 9-operation mutation tool with no output schema, the description correctly delegates parameter detail to the enum and bw_describe, which is the right structural move. However it says nothing about activation/regeneration side effects, transports, or error behavior, which are the things an agent most needs to know before invoking a destructive multi-operation 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 description coverage is 100% and the operation enum already spells out each operation's required parameters, so the schema does the heavy lifting. The description adds the meta-rule that parameters are scoped per operation and that bw_describe yields the complete definition for a single operation, which is genuinely helpful for a 47-parameter schema, but it supplies no parameter meaning of its own.

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 first sentence names a specific verb set (create, change, set/remove) against a specific resource (transformation, its field rules, routines, runtime), which tells an agent this is the write tool for BW Transformations. It does not explicitly contrast with the sibling write tools (bw_write_adso, bw_write_dtp, etc.), so the differentiation is left implicit in the object type.

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?

The description gives one concrete procedural instruction: read the operation enum, then call bw_describe for the per-operation parameter definition. That is useful invocation guidance, but there is no statement of when to choose this tool over alternatives or when not to use it, and no mention of prerequisites such as needing an existing transformation or a transport.

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