Skip to main content
Glama
dnic-dev

bw-modeling-mcp

by dnic-dev

bw_add_process_chain_plswitch

Inserts load/planning mode switch steps into an existing BW Process Chain for planning-enabled aDSOs, optionally bracketing a load step, to control when loads run.

Instructions

Add planning mode switch steps for planning-enabled aDSOs to an existing Process Chain (RSPC), via the BW/4HANA Cockpit REST API: PLSWITCHL switches the aDSOs to load mode, PLSWITCHP back to planning mode. A planning-enabled aDSO accepts no loads in planning mode, so a chain that loads it typically runs switch to load mode → (deletion) → DTP → switch to planning mode. In-place edit: reads the current model, inserts the node(s) with their INLINE process variant, and PUTs it back. mode "load" or "plan" adds one step and needs exactly one of before, after or predecessor — there is no automatic append point, because a switch beside the chain start would switch at the wrong moment. mode "bracket" encloses an existing step ("around", usually the DTP): switch to load mode ahead of it, switch to planning mode behind it, in one save. Only aDSOs offered by the cockpit value help for this step are accepted (active and planning-enabled); others are refused before anything is written. edge_mode "both" (default) adds an on-success and an on-error edge per new link, so the switch back to planning mode also runs when the load fails; "success_only" adds only the on-success edge. Idempotent: a step of the same type for the same set of aDSOs is not added again. Existing switch steps can be referenced elsewhere as "PLSWITCHL/ADSO_NAME" or "PLSWITCHP/ADSO_NAME".

Input Schema

NameRequiredDescriptionDefault
modeYes"load": add a switch to load mode (PLSWITCHL). "plan": add a switch to planning mode (PLSWITCHP). "bracket": add both around the step named in "around".
nameYesProcess chain technical name (e.g. "CHAIN_NAME"). Case-insensitive.
afterNomode "load"/"plan": insert the step AFTER this node — it runs between the target and its former successors.
aroundNomode "bracket" only: the step to enclose (usually the DTP that loads the aDSO).
beforeNomode "load"/"plan": insert the step BEFORE this node (a DTP/variant name, an aDSO held by an ADSOACT node, or "#<index>"). The target's incoming edges are rerouted through the new step.
activateNoIf true, activate the chain immediately after the edit. Default false.
edge_modeNo"both" (default): add an on-success and an on-error edge per new link. "success_only": add only the on-success edge.
datastoresYesPlanning-enabled aDSOs the step switches (e.g. ["ADSO_NAME"]). One step can switch several.
descriptionNoOptional step description (cosmetic, max. 60 characters). Defaults to the mode and the aDSO names.
predecessorNomode "load"/"plan": append the step behind this node without rerouting the node's other successors.
transport_requestNoOptional transport request to record the change into. Only relevant when the chain is in a transportable package (not $TMP). If the chain is transportable and exactly one request is available, it is chosen automatically; pass this to disambiguate when several are available. Ignored for $TMP (local) chains.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv1.9.0

TDQS

A4.7/5.0
Behavior5/5

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

With no annotations, the description carries the full behavioral burden and does so: it discloses that the edit is in-place (read model, insert node with INLINE process variant, PUT back), that validation happens before any write (only cockpit-offered, active, planning-enabled aDSOs are accepted, others refused), and that the operation is idempotent for identical type+datastore sets. It also documents edge_mode defaulting to 'both' so the switch-back runs on failure, and explains transport_request auto-selection versus $TMP behavior.

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?

Dense and front-loaded: the core purpose, mode semantics, and constraint about needing an anchor point come first. The later sentences on inline editing, aDSO validation, edge_mode, idempotency, and naming conventions are all substantive, though the description is long and could be tightened slightly without losing meaning.

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 an 11-parameter mutation tool with no annotations and no output schema, the description covers the important behavioral aspects: in-place edit mechanics, validation-before-write, idempotency, edge handling, and transport recording. It does not describe return values or error shapes (no output schema exists), and activation side effects are left mostly to the schema's 'activate' parameter description, which is a minor gap.

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%, so the baseline is 3; the description adds genuine meaning by explaining the rationale behind mode selection, the mutual exclusivity of before/after/predecessor, the fact that 'bracket' uses 'around', and that datastores must be active and planning-enabled. It stops short of describing every parameter (e.g., activate, description, transport_request details are only in schema), but the additional context on the routing parameters is meaningful.

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?

States a specific verb and resource (add planning mode switch steps / PLSWITCHL / PLSWITCHP to an existing Process Chain RSPC) and explicitly ties the operation to planning-enabled aDSOs, which separates it from siblings like bw_set_adso_planning_mode and bw_add_process_chain_program. The explanation of what a switch step actually does (switch to load mode before a DTP, back to planning mode after) removes any ambiguity about the operation.

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?

Gives explicit mode semantics (load, plan, bracket), the required anchor for single-step modes (exactly one of before/after/predecessor), and the reason there is no automatic append point. It also names the bracketing use case explicitly ('around', usually the DTP) and explains the default edge_mode behavior, so an agent knows both when and how to invoke each variant.

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

Deploy Server

Other Tools