delete_assembly_step
Deletes a step from both assembly.xml and assembly-diagram.xml in one operation to prevent dangling diagram references and Studio crashes; blocks deletion of still-referenced steps unless forced.
Instructions
Atomically deletes a step from BOTH assembly.xml AND assembly-diagram.xml.
WHY THIS EXISTS: Removing an element from assembly.xml alone leaves dangling diagram href references (element/source/target/elements), which crash Studio with scala.MatchError when the diagram opens. This tool mirrors the removal across both files in a single operation:
assembly.xml — the element block itself (self-closing or paired tag) assembly-diagram.xml — the visualProperties block wrapping the element href, every connections block whose source OR target points at the deleted step (by id OR by @mixed positional ref), and swimlane elements membership lines
For a TOP-LEVEL element it also re-numbers all higher @mixed positional indices in the diagram by -2 (removing one element plus its preceding whitespace shifts every subsequent EMF XPath index down by two).
SAFETY: Refuses to delete a step that other steps still route to (routes-to, routes-response-to, or a vm:// endpoint naming a cc:local-in) unless force=true — rewire or delete the callers first, or pass force and fix the reported references afterwards.
Creates backups of both files before writing. Runs validate_assembly after.
BATCH DELETES: call once per step ID — do not batch multiple deletes into one call.
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": {
"project_name": "<project_name>",
"step_id": "<step_id>"
},
"name": "delete_assembly_step"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| force | No | Delete even if other steps still reference this ID (the references are reported and will fail validation until rewired) | |
| dry_run | No | If true, return the planned removals without writing any files | |
| step_id | Yes | The step ID to delete, e.g. "CallLegacyFlow" | |
| project_name | Yes | Project name, e.g. "INT999_Employee_Sync" |