Skip to main content
Glama

add_bpmn_elements

Add tasks, gateways, or events to a BPMN diagram. Connect them in a chain with automatic layout, or place them at specific anchors, lanes, or flows.

Instructions

Add one or more elements (tasks, gateways, events, etc.) to a BPMN diagram; a single element is an array of one. With connect "chain" (default) each element is connected to the previous one by a sequence flow (afterElementId attaches the first one after an existing element) and the diagram is laid out; with connect "none" they are only added, each placed right of the previous one. Chains containing a gateway are not auto-connected past it — wire branches with connect_bpmn_elements. An entry that sets its own anchor or position (hostElementId, flowId, fromElementId + toLaneId, copyFrom, afterElementId, x/y) is placed there instead of being chained, and then auto-layout is off unless autoLayout is true. Supports boundary events via hostElementId, inserting into a flow via flowId, and cross-lane handoff via fromElementId + toLaneId. Subprocesses are expanded by default (isExpanded=false for collapsed). Generates descriptive element IDs when a name is provided (e.g. UserTask_EnterName). See bpmn://guides/modeling-elements for naming conventions, integration patterns, and event subprocess guidance.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
laneIdNoDefault lane for all entries; overridable per entry.
connectNo"chain" (default) connects each element to the previous one; "none" only adds them, placing each right of the previous one (starting from afterElementId) unless it sets its own anchor/position.chain
elementsYesElements to add, in order. participantId, laneId and afterElementId at the top level apply to all entries.
diagramIdYesThe diagram ID returned from create_bpmn_diagram
autoLayoutNoRun layout_bpmn_diagram afterwards (chain mode only; default true, but off when a gateway is in the chain or an entry sets its own anchor/position).
participantIdNoDefault participant (pool) for all entries; overridable per entry.
afterElementIdNoAttach the first element after this existing element (auto-positioned).

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A4.5/5.0
Behavior5/5

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

Annotations only supply readOnlyHint=false and openWorldHint=false; the description adds substantial behavior the agent could not otherwise infer: auto-layout runs after chaining, chains stop auto-connecting past a gateway, setting an anchor turns auto-layout off unless autoLayout=true, subprocesses expand by default, and IDs are auto-generated from names. It even notes response nextSteps for compensation wiring, which is well beyond annotation coverage.

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 purpose and default chaining behavior are front-loaded, and the length is justified by the tool's complexity (7 top-level params plus a large nested element object). The single dense paragraph is somewhat heavy and could be broken into shorter units, but nearly every sentence carries distinct rules.

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 complex mutation tool with no output schema and 100% schema coverage, the description covers side effects, placement overrides, boundary-event hosting, subprocess expansion, and points to bpmn://guides/modeling-elements for conventions. It only partially describes the return value (mentioning nextSteps for one case), which is a minor gap given the absence of an output schema.

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 contributes cross-parameter interaction semantics the per-field schema does not state: which anchor parameters disable auto-layout, the mutual exclusion of flowId vs afterElementId, and the pairing requirement of fromElementId + toLaneId. This meaningfully exceeds restating individual fields.

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 ("Add") and resource ("elements ... to a BPMN diagram") and enumerates the concrete element categories (tasks, gateways, events). It also distinguishes itself from connect_bpmn_elements by explaining that gateway branches must be wired with that sibling, so an agent can tell the two apart without opening a 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?

Gives explicit operating modes (connect "chain" vs "none"), the gateway exception with a named alternative ("wire branches with connect_bpmn_elements"), and the rule that an entry setting its own anchor/position opts out of chaining and auto-layout. It lacks broader selection guidance against siblings such as move_bpmn_element or batch_bpmn_operations, but the core when/when-not is present.

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