Skip to main content
Glama

auto_layout_view

Idempotent

Automatically reposition all nodes in an ArchiMate view to eliminate overlap. Supports layered, grid, and semantic layout strategies with internal or pyarchimate engines.

Instructions

Automatically reposition all nodes in a view to avoid overlap.

The default `internal` layout nests Aggregation/Composition members
inside visible Grouping nodes, wraps wide lanes into multiple rows,
aligns connected nodes vertically across lanes, and routes
connections orthogonally around nodes. With `layer_bands` (default
true) and the `layered_by_type` strategy, views spanning two or
more ArchiMate layers get labeled visual bands (diagram-only Archi
Groups — the semantic model is never modified; set
`layer_bands=false` to disable).

The engine choice applies to this call only. It is never stored on
the model or the view, so it cannot appear in an export or in
Archi's Properties tab.

Note: parameter is `strategy` (matches `auto_layout_view`) but the
equivalent parameter on `export_model_content` and
`export_model_to_file` is named `layout_strategy`.

Args:
    view_id: ID of the view to lay out.
    strategy: One of:
        - `layered_by_type` (default): ArchiMate semantic lanes
          (Motivation/Strategy on top, then Business, Application,
          Application Data, Technology/Physical/Implementation).
        - `layered`: relationship-direction layered, source nodes
          before target nodes.
        - `grid`: compact non-overlapping grid, no semantic
          ordering.
        Ignored (but still validated) by the `pyarchimate` engine,
        which has a single fixed algorithm.
    layout_engine: One of:
        - `internal` (default): everything described above.
        - `pyarchimate`: pyArchimate's own coarse-grid placement.
          Much faster on large views, but it applies no `strategy`,
          no layer bands, no lane wrapping, no barycenter
          alignment, and no ArchiMate lane ordering (its own layer
          classification misplaces SystemSoftware, Artifact, Path,
          Equipment, Facility, Material, Contract, Representation
          and ImplementationEvent). Best for flat views of
          default-sized nodes. It has no collision detection, so a
          view whose nodes do not fit its grid cell is refused
          rather than silently overlapped — see Errors.

Returns:
    Success envelope with the resulting `ViewDetail` in `data`
    (nodes with updated x/y/width/height and connections). Under
    `pyarchimate` the message says which options were not applied.

Errors:
    `ViewNotFoundError` (returned as `ModelOperationError`) when
        `view_id` is unknown.
    `ModelOperationError` for an unknown strategy or engine, with
        close matches in `error.details.suggestions`.
    `ModelOperationError` when `layout_engine="pyarchimate"` cannot
        lay the view out safely, with `error.details.grid_size` and
        `error.details.oversized_nodes`. No placement is written, so
        the view is never left half laid out, but the shared
        prologue (Grouping nesting, group sizing) may already have
        repaired it. Retry with `layout_engine="internal"`.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
view_idYes
strategyNolayered_by_type
layer_bandsNo
layout_engineNointernal

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior5/5

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

The description discloses many behavioral traits beyond annotations: the engine choice is call-only and not persisted, pyarchimate's limitations and error behavior, how layer bands work without modifying the model, and collision detection. No contradictions with annotations (idempotentHint=true is consistent with non-destructive, stateless layout).

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is very long and contains a lot of detail, which is helpful but not concise. It includes error details, return structure, and parameter explanations. While well-structured with sections, it could be more succinct, especially by moving some details to the parameter schema descriptions.

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?

Given the tool's complexity (4 parameters, strategies, engines, errors, return values), the description is complete. It covers all aspects: purpose, parameters, return values, errors, and behavioral nuances. The output schema exists but the description still adds value by explaining the return content.

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?

The schema has 0% description coverage, so the description carries full burden. It thoroughly explains each parameter in the 'Args:' section, including default values, allowed values, and behavioral effects (e.g., layer_bands description, pyarchimate ignoring strategy). This adds significant meaning beyond the raw 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?

The description clearly states the tool's action: 'Automatically reposition all nodes in a view to avoid overlap.' It uses a specific verb ('reposition') and resource ('nodes in a view'), and distinguishes from sibling tools like add_node_to_view and connect_visible_relationships which operate on nodes in different ways.

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?

The description provides extensive guidance on when to use each strategy and layout engine, explaining trade-offs like speed and features. However, it does not explicitly state when to choose this tool over alternatives, though the sibling tools are clearly different. The note about parameter naming differences with export tools adds practical context.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/byrondelgado/mcp-archimate'

If you have feedback or need assistance with the MCP directory API, please join our Discord server