Skip to main content
Glama

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

NameRequiredDescriptionDefault
forceNoDelete even if other steps still reference this ID (the references are reported and will fail validation until rewired)
dry_runNoIf true, return the planned removals without writing any files
step_idYesThe step ID to delete, e.g. "CallLegacyFlow"
project_nameYesProject name, e.g. "INT999_Employee_Sync"

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.8.0

TDQS

A4.9/5.0
Behavior5/5

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

With no annotations supplied, the description carries the full burden and does so thoroughly: it enumerates exactly what is destroyed in each file, discloses the @mixed index renumbering side effect, states that backups are created, and confirms validate_assembly runs afterwards. It also documents the refusal-to-delete safety behavior and the force override, which an agent could not infer otherwise.

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?

The core action is front-loaded, and the WHY/SAFETY/BATCH headers make the long body scannable rather than a wall of text. A few details, such as the named scala.MatchError and the per-file bullet breakdown, are more verbose than strictly needed for tool selection, though they are not wasted for a destructive operation.

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?

For a destructive, cross-file mutation with no output schema and no annotations, the description covers everything an agent needs: scope of deletion, cascading edits, renumbering, backup creation, post-write validation, override semantics, and the one-call-per-ID constraint. There is no material gap an agent would have to guess at before calling.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so a 3 would be the baseline, but the description adds real meaning beyond it: it explains force as an override of the reference-integrity check with post-hoc rework implied, and dry_run is corroborated by the statement that planned removals are returned without writing. This connects the parameters to the tool's actual failure model rather than restating field names.

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?

The opening sentence states a specific verb ('atomically deletes'), resource ('a step'), and scope ('BOTH assembly.xml AND assembly-diagram.xml'), which immediately distinguishes it from generic file tools like write_integration_file or delete_file. An agent can tell exactly what operation this performs without opening the schema.

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?

It explicitly states when to use it (any step removal, because editing assembly.xml alone leaves dangling diagram hrefs), what NOT to do (do not batch multiple IDs into one call), and the alternative workflow when references exist (rewire or delete callers first, or pass force and fix reported references). Nothing about tool selection or invocation cadence is left to inference.

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