Skip to main content
Glama

align_bpmn_elements

Idempotent

Aligns or distributes selected BPMN elements along an axis with optional pixel gaps to fix uneven diagram layouts.

Instructions

Align or distribute selected elements. Supports two operations: (1) align — align elements along an axis (left, center, right, top, middle, bottom), requires at least 2 elements. Use compact=true to also redistribute with ~50px gaps. (2) distribute — evenly distribute elements horizontally or vertically using edge-to-edge spacing, requires at least 3 elements. Use gap for exact pixel spacing (recommended: 50). ⚠️ Warning: alignment: middle on a process with parallel branches collapses all branches onto a single Y row, causing horizontal overlaps. Use layout_bpmn_diagram instead to re-arrange the full diagram while preserving branch separation. If you must use alignment: middle, pass compact: true to detect and spread overlapping elements on the X axis afterwards.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
gapNoFixed edge-to-edge gap in pixels between elements (for distribute operation). Standard BPMN spacing is ~50px. When omitted, elements are evenly distributed within their current span.
compactNoWhen true (align operation), also redistributes elements along the perpendicular axis with ~50px edge-to-edge gaps.
alignmentNoThe alignment direction (for align operation)
diagramIdYesThe diagram ID
elementIdsYesArray of element IDs to align or distribute
orientationNoDistribution direction (for distribute operation)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A4.8/5.0
Behavior5/5

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

Annotations declare readOnlyHint=false and idempotentHint=true, but the description adds crucial destructive-behavior context beyond them: the `alignment: middle` collapse of parallel branches onto a single Y row and the resulting horizontal overlaps. It also prescribes a mitigation (compact=true) and a safer alternative, which is exactly the disclosure a mutation tool needs.

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 core purpose, then numbered operations, then the warning. The warning paragraph is long but each sentence (risk, safer alternative, mitigation) earns its place; minor redundancy in re-explaining compact.

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 6-parameter mutation tool with no output schema, the description covers the operations, preconditions, parameter interactions, failure modes, and the fallback tool. Nothing needed to invoke it correctly is missing.

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 operational meaning: it ties `compact` to the align operation, ties `gap` to distribute and recommends ~50px, and maps the enum values to the align/distribute operations. It goes beyond restating the schema.

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 ('Align or distribute') and resource ('selected elements'), then enumerates the two operations with their axes. It is clearly distinguishable from siblings like move_bpmn_element or layout_bpmn_diagram.

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?

Explicitly states the preconditions for each mode (align needs ≥2 elements, distribute needs ≥3) and names the alternative ('Use layout_bpmn_diagram instead to re-arrange the full diagram while preserving branch separation') with the condition that selects it.

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