Skip to main content
Glama
dnic-dev

bw-modeling-mcp

by dnic-dev

bw_set_transformation_expert_routine

Write existing routine code into transformation master and activate, ensuring it survives regeneration and transport imports.

Instructions

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 transport import — then activate. Use this instead of abap-adt WriteSource on the generated /BIC/_M class: WriteSource updates only the generated class body, which BW re-generates from the old master on the next trfn activation or transport import (symptom: "return type mismatch … OUTTAB[…]"). This tool replicates the Eclipse editor: it writes the class, then re-saves the transformation master and runs a TLOGO activation via the BW modeling endpoints. The routine must already exist (create it first with bw_set_transformation_routine). Activates automatically — no separate bw_activate needed.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sourceNoThe complete routine method block: "METHOD <NAME> BY DATABASE PROCEDURE … ENDMETHOD." for AMDP (HANA) routines, or "METHOD <NAME> … ENDMETHOD." for ABAP routines — the same block shape abap-adt WriteSource(method=…) expects. AMDP SQLSCRIPT must be 7-bit ASCII (no umlauts / no <=). If omitted, the generated class is left untouched and only the master re-save + activation runs (to commit code already edited on the class).
transportNoTransport request number (e.g. DEVK900123). Required if the BW system requires transport assignment.
class_nameNoOptional override for the generated class name (e.g. "/BIC/<uuid>_M"). Defaults to the class derived from the transformation. Use for non-standard/field routines.
method_nameNoOptional override for the routine method name (e.g. a field-routine method). Defaults to GLOBAL_<ROUTINE_TYPE>. When set, the routine-exists guard is skipped.
routine_typeNo"expert" → GLOBAL_EXPERT (default), "start" → GLOBAL_START, "end" → GLOBAL_END. Selects the generated method name.
transformation_nameYesTransformation name (UUID-like key).
Behavior5/5

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

With no annotations, the description carries full burden. It details the internal mechanism (writes to master, re-saves, activates), constraints (AMDP 7-bit ASCII), and behavior when source is omitted. No contradictions.

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?

Despite being a single paragraph, every sentence adds unique information. No fluff, highly efficient use of words covering purpose, method, and constraints.

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

Completeness5/5

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

Thoroughly explains the problem, solution, prerequisites, steps, and activation behavior. All 6 parameters are addressed directly or indirectly. No output schema needed given the descriptive detail.

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% with clear parameter descriptions. The tool description adds value by explaining defaults (routine_type, method_name) and clarifying the source block shape. Adds context beyond schema.

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?

Clearly states the tool writes code into the transformation master to persist through regeneration. Distinguishes from sibling bw_set_transformation_routine by specifying that the routine must already exist.

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?

Explicitly advises to use this instead of abap-adt WriteSource, explains why WriteSource fails, and notes that the routine must be created first. Provides clear when-to-use context.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/dnic-dev/bw-modeling-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server