layout-within-group
Arrange child elements inside a container using row, column, or grid patterns. The container may be a visual group or an ArchiMate-element container (ApplicationComponent, Node, ApplicationFunction, etc.) that holds nested children — the same arrangement / spacing / padding / columns / autoResize /
How to use it
layout-within-group is exposed by the Archi MCP Server MCP server. Add the server to your MCP client (Claude Desktop, Cursor, Windsurf and others), and the layout-within-group tool becomes available to the model automatically. See the full listing for setup details and every tool this server provides.
Install Archi MCP Server
claude mcp add --transport http archi http://127.0.0.1:18090/mcpOther tools in Archi MCP Server (39)
Add a visual connection representing an existing model relationship, with optional styling, label suppression, and label positioning
Add a visual grouping rectangle (pure visual container, no model representation). Optional imagePath, imagePosition, showIcon for custom icon overlays, and recede: false to suppress the auto-backdrop when nesting inside an unauthored-fill container
Add a standalone image as a first-class diagram node (sibling to notes, groups, and view-references). Requires viewId and an imagePath returned by add-image-to-model or list-model-images. Default size is the image's natural dimensions; typo'd paths are rejected with IMAGENOTFOUND. Distinct from upda
Add a text note annotation (pure visual, no model representation). Optional imagePath, imagePosition, showIcon, and note-specific borderType
Place a model element onto a view diagram (same element can appear on multiple views). Optional imagePath, imagePosition, showIcon for custom icon overlays, labelExpression for a per-view-object dynamic label template (e.g. "${name}", "${property:Owner}"), and recede: false to suppress the auto-back
Embed another ArchiMate view as a clickable thumbnail (the agent-driven equivalent of Archi GUI's drag-view-onto-view). Requires viewId (target) and referencedViewId (source). The referenced view's name is not stored on the visual — renaming the referenced view auto-updates every embedding
Apply a complete visual layout atomically (up to 10,000 entries per call)
Position top-level groups relative to each other in grid, row, or column layout. Density-aware default: when spacing is omitted on a view with inter-group connections, the tool derives a connection-count-aware default (≤ 15 → 80 px, 16–30 → 100 px, > 30 → 120 px). Pass an explicit spacing to suppres
Two modes: auto (default) uses ELK Layered to compute positions AND routes in one operation; grouped orchestrates the full grouped-view workflow (layout-within-group + arrange-groups + optimize-group-order + auto-route-connections) atomically. Smart iteration when targetRating is set — factor-aware
Orthogonal connection routing using clearance-weighted visibility-graph A pathfinding with corridor directionality, corridor diversity, group-wall awareness, channel-global ordered nudging, and post-routing path straightening. Two modes: mode: "full" (default) re-routes whole connections via visibil
Remove all visual elements and connections from a view (model objects preserved)
Duplicate an existing view with all visual contents (elements, groups, notes, connections, bendpoints, styling). The clone references the same model objects
Create an ArchiMate element with type validation and duplicate detection. Optional specialization parameter auto-creates the specialization on first use. A folderId that points at a folder whose ArchiMate layer is illegal for the element type is rejected up front with FOLDERLAYERMISMATCH (delegated
Create a relationship with ArchiMate specification rule enforcement. Optional specialization parameter auto-creates the specialization on first use. Optional type-conditional semantic attributes: accessType (AccessRelationship), associationDirected (AssociationRelationship), influenceStrength (Influ
Define a specialization explicitly without creating any element. Idempotent on duplicate (name, conceptType) — useful for pre-registering vocabulary at session start. Optional imagePath sets the specialization's icon (Archi renders it on every concept of that specialization)
Create a new diagram view with optional viewpoint and connection router type
Delete a specialization. Refuses by default if any concept uses it; pass force: true to detach references and delete in one atomic command
Reverse where-used lookup — given an element or relationship ID, returns every view and visual object/connection that references it. Inverse of get-view-contents. Use before delete-element / delete-relationship / rename / re-type to see the cross-view footprint in one round-trip
Retrieve element(s) by ID (single via id or batch via ids array)
Model overview — name, purpose, custom properties, element/relationship/view counts by type and layer, plus specialization count. Read counterpart to update-model
Discovery-first — returns existing element if exact name+type match exists, otherwise creates new
Traverse relationships with configurable depth (0-3 hops) or multi-hop chain traversal with direction/type/layer filters
Audit query — lists every element and relationship referencing a specialization. Call before rename or delete
View diagram contents — elements, relationships, visual positions, connection routing, image visuals, and the full styling surface (typography, gradient, alignment, line style, labelExpression) so styling mutations can be read back and verified. format: "tree" returns the containment hierarchy, desc
List views with optional viewpoint type or name filtering
Automatic layout for flat (non-grouped) views — row, column, or grid arrangement with optional sorting by name/type/layer and category grouping
List every specialization defined on the model with (name, conceptType, layer, usageCount, imagePath). Optional conceptType filter
Reorder elements within groups to minimise inter-group edge crossings
Remove a visual element or connection from a view (model object preserved)
Combined search + conditional create with duplicate candidate display
Full-text search across element names, documentation, and properties with optional type, layer, and specialization filters
Search all relationships by text, type, source/target element layer, and specialization — no element ID needed
Update element name, documentation, properties, or specialization (pass "" to clear)
Update the loaded model's own name, purpose, and custom properties as a single undo unit. At least one of the three must be provided; omitted fields stay unchanged. Empty-string purpose clears the field; null property values remove a key
Update relationship name, documentation, properties, or specialization (pass "" to clear). Optional type-conditional semantic attributes: accessType (AccessRelationship), associationDirected (AssociationRelationship), influenceStrength (InfluenceRelationship). Source, target, and type are immutable
Rename a specialization and/or set its icon. Refuses to merge into an existing target name. Existing references move with the rename. Optional imagePath (set/change icon) and clearImagePath: true (explicit clear) — mutually exclusive. At least one of newName, imagePath, or clearImagePath must be sup
Update view name, viewpoint, documentation, properties, or connection router type
Replace bendpoints, update styling, toggle label visibility, and/or set label position of a connection on a view
Update position, size, styling, image, labelExpression, and/or anchor of a visual element on a view. Optional anchoring (anchorTarget, anchorEdge below/above/right/left — default below, anchorDx/anchorDy) makes the object follow a target container's edge, resolved from the target's current bounds at