Skip to main content
Glama

auto_layout_view

Idempotent

Automatically repositions nodes in a view to eliminate overlap, using strategies like layered by type or grid layout for clear organization.

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 laid-out view in `data`. Under
    `pyarchimate` the message says which options were not applied.

    `detail="summary"` (default) returns the view's identity,
    `properties`, `metadata`, `node_count`, `connection_count`, and
    a `bounds` box (`{x, y, width, height}`, or null for an empty
    view) giving the canvas the layout consumed — enough to place a
    note in free space afterwards.

    `detail="full"` adds `nodes` (each with x/y/width/height) and
    `connections`. Ask for it when you need per-node geometry; it
    is several thousand tokens on a mid-sized view.

    Both shapes report the band outcome directly:
    `layer_bands_created` (int) and `layer_bands_reason`, which is
    null when bands were created and otherwise one of
    `single_layer_view`, `coverage_view`, `not_requested`,
    `strategy_does_not_use_bands`, or
    `engine_does_not_support_bands`. Zero bands on a single-layer
    view is correct, not a failure.

Errors:
    `ViewNotFoundError` (returned as `ModelOperationError`) when
        `view_id` is unknown.
    `ModelOperationError` for an unknown strategy, engine, or
        `detail` level, 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
detailNosummary
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 goes beyond annotations by disclosing that engine choice is not stored, that layer bands do not modify the semantic model, and that pyarchimate engine misplaces certain element types and has no collision detection. It also documents error behaviors, adding transparency beyond the idempotentHint and readOnlyHint annotations.

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 description is well-structured with sections, bullet points, and bold parameter names. It front-loads the main purpose and includes detailed options. However, it is somewhat lengthy and has minor redundancy (e.g., band outcomes explained twice), which slightly reduces conciseness.

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, 5 parameters, and an output schema, the description thoroughly covers input semantics, error cases, return values with two detail levels, and engine-specific caveats. It leaves no critical gaps for an agent to invoke the tool correctly.

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?

With 0% schema description coverage, the description fully compensates by explaining every parameter (view_id, strategy, layout_engine, layer_bands, detail) with options, defaults, and behavior details. 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 starts with a specific verb and resource: 'Automatically reposition all nodes in a view to avoid overlap.' It then details behaviors for different engines and strategies, clearly distinguishing this layout tool from sibling tools like add_element or export_model_content.

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 clearly indicates when to use this tool (to layout a view) and compares the two layout engines, noting trade-offs. It does not explicitly state when not to use it or list alternatives, but the context is sufficient for an agent to decide.

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