Skip to main content
Glama

connect_bpmn_elements

Connect BPMN elements automatically, choosing SequenceFlow, MessageFlow, Association, or DataAssociation based on context. Supports pair, chain, batch, or waypoint modes for flexible diagram wiring.

Instructions

Connect BPMN elements. Supports pair mode (sourceElementId + targetElementId), chain mode (elementIds array for sequential connections), or batch mode (connections array for arbitrary source/target pairs, e.g. a gateway's branches with per-branch conditions). Auto-detects connection type: SequenceFlow for normal flow, MessageFlow for cross-pool, Association for text annotations, and DataAssociation for data objects/stores. Supports optional condition expressions for gateway branches and isDefault flag for gateway default flows. To modify an existing connection's label or condition after creation, use set_bpmn_element_properties with the connection's ID. Also supports waypoint mode: provide connectionId + waypoints to set custom routing on an existing connection.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
labelNoOptional label for the connection
diagramIdYesThe diagram ID
isDefaultNoWhen connecting from an exclusive/inclusive gateway, set this flow as the gateway's default flow (taken when no condition matches).
waypointsNoOrdered array of waypoints defining the connection path (waypoint mode). Must have at least 2 points (start and end). Use with connectionId.
autoLayoutNoWhen true, run layout_bpmn_diagram automatically after connecting. Useful after the last connection in a sequence. Default: false.
elementIdsNoOrdered list of element IDs to connect sequentially (chain mode). When provided, sourceElementId and targetElementId are ignored.
connectionsNoBatch mode — arbitrary source/target pairs (e.g. a gateway's branches), validated up front and applied as one undo step. Each item takes the same fields as pair mode above.
connectionIdNoID of an existing connection to update waypoints on (waypoint mode). Must be provided together with waypoints.
connectionTypeNoType of connection (default: auto-detected). Usually not needed — the tool auto-detects the correct type.
sourceElementIdNoThe ID of the source element (pair mode)
targetElementIdNoThe ID of the target element (pair mode)
conditionExpressionNoOptional condition expression for sequence flows leaving gateways (e.g. '${approved == true}')

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A4.3/5.0
Behavior4/5

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

Annotations only declare readOnlyHint=false and openWorldHint=false, so the description must carry the behavioral load, and it does: it discloses automatic connection-type detection (SequenceFlow/MessageFlow/Association/DataAssociation), support for condition expressions and isDefault on gateway flows, and the existence of a waypoint-update path. It does not mention undo/permission semantics for the create path, leaving a small gap.

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?

Front-loaded with the verb and the mode enumeration, and each subsequent sentence (auto-detection, condition/isDefault, alternative tool, waypoint mode) carries distinct information. It is dense but nearly every clause earns its place; only slight redundancy between the mode list here and the oneOf descriptions costs it a point.

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 12-parameter mutation tool with no output schema, the description covers modes, auto-detection behavior, gateway-flow options, and the alternative tool for edits. The one notable gap is that waypoint mode requires a connectionId from a prior call, and the description does not state how an agent obtains that ID from the create result.

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, but the description adds real meaning by mapping parameter groups to named modes and giving a concrete example (a gateway's branches with per-branch conditions) that clarifies the connections array's purpose. It stops short of documenting the individual field names beyond what the schema already states.

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+resource ('Connect BPMN elements') and immediately enumerates the four operating modes (pair, chain, batch, waypoint), which lets an agent distinguish the shape of call it needs. It also names the sibling it is not ('To modify an existing connection... use set_bpmn_element_properties'), so it is separable from set_bpmn_element_properties without opening either schema.

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?

Explicitly routes post-creation edits of label/condition to set_bpmn_element_properties with the connection ID, which is a genuine when-to-use-this-vs-alternative statement. It also explains which mode to pick via the source/target shape (pair vs chain vs batch vs waypoint), though it gives no explicit exclusions for the tool as a whole.

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