export_model_to_file
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
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | ||
| auto_layout | No | ||
| quality_gate | No | off | |
| allow_orphans | No | ||
| layout_engine | No | internal | |
| output_format | No | archi | |
| layout_strategy | No | layered_by_type | |
| allow_visual_issues | No | ||
| allow_semantic_issues | No | ||
| include_quality_report | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||