Skip to main content
Glama

create_model_from_spec

Destructive

Create a complete ArchiMate model from a structured JSON spec. Accepts elements, relationships, and views with optional rollback on error.

Instructions

Create a complete ArchiMate model from a structured JSON spec.

The spec is applied transactionally by default. Element, relationship,
and view objects accept either short field names (`type`, `source`,
`target`, `id`, `element`, `relationship`) or the long forms used by
individual tools (`element_type`, `relationship_type`, `source_id`,
`target_id`, `element_id`, `relationship_id`, `view_id`).

Spec shape:
    ```
    {
      "name": "Model Name",                    # required
      "elements": [                              # optional list
        {
          "id": "id-customer",                # optional stable ref
          "name": "Customer",                  # required
          "type": "BusinessActor",             # required
          "description": "...",               # optional
          "folder_path": "/Business",         # optional
          "properties": {"owner": "EA"}        # optional
        }
      ],
      "relationships": [
        {
          "id": "id-uses",                    # optional stable ref
          "type": "Serving",                   # required
          "source": "id-customer",             # required ref or UUID
          "target": "id-portal",               # required ref or UUID
          "name": "uses",                      # optional
          "description": "...",               # optional
          "properties": {...},                  # optional
          "access_type": "Read",                # for Access only
          "influence_strength": "+"             # for Influence only
        }
      ],
      "views": [
        {
          "id": "id-context",                  # optional stable ref
          "name": "Context",                   # required
          "folder_path": "/Views",            # optional
          "nodes": [                            # optional
            {"element": "id-customer",
             "x": 40, "y": 40,                  # x/y optional
             "width": 160, "height": 80}        # width/height optional
          ],
          "connections": [                       # optional
            {"relationship": "id-uses"}
          ],
          "connect_visible_relationships": true, # optional
          "auto_layout": true,                  # optional
          "layout_strategy": "layered_by_type", # optional
          "layout_engine": "internal"           # optional; or
                                                # "pyarchimate"
        }
      ]
    }
    ```

Args:
    spec: Specification object as described above.
    rollback_on_error: When true (default), restore the previous
        active model on any failure. Set to false to keep partial
        results.

Returns:
    Success envelope with `data` containing summary IDs of created
    model, elements, relationships, and views.

Errors:
    `INVALID_SPEC` for missing required keys.
    `InvalidElementTypeError`, `InvalidRelationshipTypeError`,
    `ElementNotFoundError`, `ModelOperationError` for validation or
    creation failures.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
specYes
rollback_on_errorNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior4/5

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

Annotations indicate destructiveHint=true and readOnlyHint=false; the description adds transactional rollback behavior, field aliases, and error types. It does not mention potential side effects like model overwriting or permission requirements, but provides substantial context beyond 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 lengthy but well-structured with a code block and bullet points. It front-loads the purpose and organizes details logically. While slightly verbose, the complexity of the tool justifies the length.

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

Completeness4/5

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

Given the tool's complexity (nested objects, 2 params, 0% schema coverage), the description covers input format, errors, and return summary. An output schema exists but is not detailed in the description; however, the explanation is complete enough for an AI to use effectively.

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 coverage is 0% with no descriptions for the two parameters. The description fully compensates by detailing the entire spec object structure, field options, and the rollback parameter's effect. This adds significant meaning absent from the 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 'Create a complete ArchiMate model from a structured JSON spec,' using a specific verb-resource pair. It distinguishes itself from sibling tools like 'add_element' and 'create_empty_model' which handle granular operations.

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 explains the spec format and default transactional behavior, implying use for bulk creation. While it doesn't explicitly state when to use alternatives, the detailed spec suggests a specific use case. Siblings like 'add_elements' exist for simpler batch operations, so the guidance is clear but not exhaustive.

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