Skip to main content
Glama
bw-modeling-mcp

bw-modeling-mcp

by dnic-dev

bw_add_process_chain_edge

Adds one dependency edge between existing process chain steps by reading the current model and saving it back, so you can repair chain wiring or connect a newly inserted block.

Instructions

Add one dependency (edge) between two existing steps of a Process Chain (RSPC), via the BW/4HANA Cockpit REST API. In-place edit: reads the current model, appends the edge, and PUTs it back. Use this to repair the wiring of a chain — for example to connect the end of a newly inserted block to the step that must run after it. Note that an "always continue" dependency is TWO edges (one on-success, one on-error): call this twice, once with status "positive" and once with "negative". Idempotent: an identical edge is skipped without writing. A 412 on the PUT means the ETag was stale (chain modified between read and write); the error reports this explicitly.

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": {
      "name": "<name>",
      "from": "<from>",
      "to": "<to>"
    },
    "name": "bw_add_process_chain_edge"
  }
}

Input Schema

NameRequiredDescriptionDefault
toYesTarget step. Same reference forms as "from".
fromYesSource step. Node reference forms: a DTP or process-variant name; an aDSO held by an ADSOACT/ADSOREM node; the program of an ABAP step, or "PROGRAM/VARIANT"; a planning mode switch as "PLSWITCHL/ADSO_NAME" or "PLSWITCHP/ADSO_NAME"; "TRIGGER" or a collector type ("AND"/"OR"); or "#<index>" using the step numbers printed by bw_get_process_chain. An ambiguous name is rejected with the candidates listed.
nameYesProcess chain technical name (e.g. "CHAIN_NAME"). Case-insensitive.
statusNoEdge condition: "positive" = on success, "negative" = on error, "neutral" = unconditional. Defaults to "neutral" when the source is the TRIGGER or a collector (neither can succeed or fail), "positive" otherwise.
activateNoIf true, activate the chain immediately after the edit. Default false.
sub_statusNoBranch condition for an edge leaving a DECISION step: the branch EVENTNO, e.g. "01" (THEN/JA) or "02" (ELSE/NEIN). Defaults to "00" (a normal, non-branch edge). A branch edge is always "positive".
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. Changed1 schema field changedv1.9.0
    • changedInput schema / properties / from / description
      Previous value: -"Source step. Node reference forms: a DTP or process-variant name; an aDSO held by an ADSOACT/ADSOREM node; the program of an ABAP step, or \"PROGRAM/VARIANT\"; \"TRIGGER\" or a collector type (\"AND\"/\"OR\"); or \"#<index>\" using the step numbers printed by bw_get_process_chain. An ambiguous name is rejected with the candidates listed."New value: +"Source step. Node reference forms: a DTP or process-variant name; an aDSO held by an ADSOACT/ADSOREM node; the program of an ABAP step, or \"PROGRAM/VARIANT\"; a planning mode switch as \"PLSWITCHL/ADSO_NAME\" or \"PLSWITCHP/ADSO_NAME\"; \"TRIGGER\" or a collector type (\"AND\"/\"OR\"); or \"#<index>\" using the step numbers printed by bw_get_process_chain. An ambiguous name is rejected with the candidates listed."
  2. Addedv1.4.0

TDQS

A4.1/5.0
Behavior4/5

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

With no annotations, the description carries the burden well: it discloses the read-modify-write model, idempotency (identical edge skipped, no write), and the 412 stale-ETag failure mode with explicit error reporting. It leaves out whether editing an active chain is permitted and whether permissions or locks are required.

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?

Purpose is front-loaded in the first clause, followed by mechanics, use case, and edge-case handling in a compact sequence. Every sentence carries actionable content with no repetition of the schema.

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 7-parameter mutation tool with no annotations and no output schema, the description covers the risky parts: write behavior, idempotency, and the primary failure mode. Still missing basic expectations such as what a successful call returns or state requirements on the target chain.

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 schema alone justifies a 3; the description goes further by explaining cross-parameter behavior — the status defaults depend on the source node type, and branch edges leaving a DECISION step are always positive. That gives the agent context the per-field schema text does not fully 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?

States a specific verb and resource: adds one dependency edge between two existing steps of a Process Chain, and clarifies the in-place read-append-PUT mechanics. It implicitly separates itself from bw_remove_process_chain_edge by scope (single edge) but never distinguishes itself from the very similar sibling bw_add_process_chain_error_links, which is a real ambiguity given this tool also handles on-error edges.

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?

Gives a concrete when-to-use scenario (repair the wiring after inserting a block) and an important operational rule: an "always continue" dependency needs two calls, positive and negative. It does not state when to prefer an alternative tool or any prerequisite such as the chain needing to be inactive.

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