Skip to main content
Glama

export_model_content

Idempotent

Serialize the active ArchiMate model as XML string content, with support for multiple output formats and optional automatic layout.

Instructions

Serialize the active model as XML string content.

Use this when the caller wants the XML in the response payload. Use
`export_model_to_file` to write directly to disk.

Args:
    output_format: One of `archimate` (default, Open Group exchange
        XML), `archi` (Archi native `.archimate` XML, opens directly
        in Archi), or `xml`.
    auto_layout: When true, run layout on every view before
        serialization. Defaults to false.
    layout_strategy: Layout strategy used when `auto_layout=true`.
        One of `layered_by_type` (default, ArchiMate semantic
        lanes), `layered` (relationship-direction layered), or
        `grid`.
    layout_engine: Layout engine applied to every view when
        `auto_layout=true`. One of `internal` (default) or
        `pyarchimate` (see `auto_layout_view` for what the latter
        gives up). Per-call only: nothing about the engine is
        written into the exported file. Validated even when
        `auto_layout=false`, so a typo is never swallowed.

Returns:
    Success envelope with `data.content` (XML string),
    `data.auto_layout`, and (when `auto_layout=true`)
    `data.layout_strategy` and `data.layout_engine`.

Errors:
    `ModelNotFoundError` if no model is active.
    `UnsupportedFormatError` for an unknown `output_format`.
    `ModelOperationError` for layout or serialization failures,
        including an unknown strategy/engine (with
        `error.details.suggestions`) and a view the `pyarchimate`
        engine cannot lay out safely — one such view fails the
        whole export.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
auto_layoutNo
quality_gateNooff
allow_orphansNo
layout_engineNointernal
output_formatNoarchimate
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 indicate the tool is idempotent and non-destructive. The description adds context that auto-layout is per-call only and not persisted, enhancing transparency. However, it stops short of explicitly stating no model modification occurs.

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 lengthy but well-structured with clear Args, Returns, and Errors sections. It could be slightly more concise, but the detail is justified given the number of parameters.

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?

Despite 9 parameters and no schema descriptions, the description fully documents all parameters, return format, and errors. An output schema exists, so the return format detail is sufficient.

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?

Schema description coverage is 0%, but the description includes a detailed Args section that explains all 9 parameters, including defaults and valid values, fully compensating for the schema gap.

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 'Serialize the active model as XML string content,' specifying the verb (serialize), resource (active model), and output (XML string). It distinguishes from the sibling tool `export_model_to_file` by noting when to use each.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides explicit guidance: 'Use this when the caller wants the XML in the response payload. Use `export_model_to_file` to write directly to disk.' It also explains parameter usage and lists error conditions.

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