Skip to main content
Glama

export_model_to_file

Idempotent

Serialize the active ArchiMate model and export it to a local file in .archi, .archimate, or .xml format, with optional auto-layout before writing.

Instructions

Serialize the active model and write it to a local file.

Preferred when the user wants a `.archimate` file Archi can open
directly. Parent directories are created if missing.

Args:
    path: Output path on the MCP server's filesystem. `~` is
        expanded; relative paths resolve against the server's CWD.
    output_format: One of `archi` (default, Archi native), `archimate`
        (Open Group exchange), or `xml`.
    auto_layout: When true, lay out every view before serialization.
    layout_strategy: One of `layered_by_type` (default), `layered`,
        or `grid`. Only applied when `auto_layout=true`.
    layout_engine: One of `internal` (default) or `pyarchimate`
        (see `auto_layout_view` for what the latter gives up).
        Only applied when `auto_layout=true`, but always
        validated. Per-call only: the engine is never recorded in
        the written file.

Returns:
    Success envelope with `data.path`, `data.output_format`,
    `data.bytes_written`, `data.auto_layout`, and (when
    `auto_layout=true`) `data.layout_strategy` and
    `data.layout_engine`.

Errors:
    `ModelNotFoundError` if no model is active.
    `UnsupportedFormatError`, `ModelOperationError` for invalid
    path/format, an unknown strategy/engine (with
    `error.details.suggestions`), a view the `pyarchimate` engine
    cannot lay out safely, or serialization failure.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYes
auto_layoutNo
quality_gateNooff
allow_orphansNo
layout_engineNointernal
output_formatNoarchi
layout_strategyNolayered_by_type
allow_visual_issuesNo
allow_semantic_issuesNo
include_quality_reportNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior4/5

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

Annotations already indicate idempotentHint=true, readOnlyHint=false, and destructiveHint=false. The description adds important behavioral details: parent directories are created, the layout engine is per-call only, and specific error conditions like suggestions for invalid strategies. No contradiction with 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 Args, Returns, and Errors sections. It front-loads the core action. While detailed, it remains readable and avoids redundancy, though some parameter details could be trimmed.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The description has a Returns section (output schema exists) and an Errors section, providing good coverage of outcomes. However, 5 undocumented parameters reduce completeness for a tool of this complexity.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The schema has 10 parameters with 0% description coverage. The description explains 5 parameters (path, output_format, auto_layout, layout_strategy, layout_engine) and their defaults/conditions. However, 5 parameters (quality_gate, allow_orphans, allow_visual_issues, allow_semantic_issues, include_quality_report) are not mentioned, leaving gaps.

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 'Serialize the active model and write it to a local file,' which is a specific verb+resource pair. It also clarifies the preferred use case for producing a .archimate file that Archi can open directly, distinguishing it from sibling tools like load_model_from_file 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 states it is 'Preferred when the user wants a .archimate file Archi can open directly,' giving clear context. However, it does not explicitly mention when not to use it or list alternative tools for other scenarios.

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