Skip to main content
Glama

add_relationships

Batch-add relationships to the active ArchiMate model in one call, with optional rollback on error to restore previous state.

Instructions

Add multiple relationships to the active model in one call.

Each relationship item supports the same fields as `add_relationship`.
Short and long field names are both accepted (`type` or
`relationship_type`, `source` or `source_id`, `target` or
`target_id`, `id` or `relationship_id`).

IDs are unique across the **entire active model**, not per call,
per batch, or per concept type. Splitting a build across several
batches does not give each batch its own id space, so namespace
generated ids (`bp-`, `ac-`, `tech-`) rather than restarting the
same naming pattern in each one.

Relationship item shape:
    ```
    {
      "id": "id-uses",                # optional stable ref
      "type": "Serving",                # required (alias: relationship_type)
      "source": "id-customer",          # required (alias: source_id)
      "target": "id-portal",            # required (alias: target_id)
      "name": "uses",                   # optional
      "description": "...",            # optional
      "properties": {"k": "v"},         # optional
      "access_type": "Read",            # for Access only
      "influence_strength": "+"         # for Influence only
    }
    ```

Args:
    relationships: List of relationship item objects.
    rollback_on_error: When true (default), restore the previous
        model state if any item fails.

Returns:
    Success envelope with `data.relationships` (list of
    `RelationshipDetail`), `data.count`, and
    `data.rollback_on_error`.

Errors:
    `InvalidRelationshipTypeError`, `ElementNotFoundError`,
    `ModelNotFoundError`, `ModelOperationError` for the first
    failing item.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
relationshipsYes
rollback_on_errorNo
semantic_validationNowarn

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior5/5

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

The description details rollback_on_error behavior, ID uniqueness across entire model, and includes error types. Annotations (readOnlyHint=false) are consistent with description's write nature.

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?

Description is well-structured with sections for notes, item shape, Args, Returns, Errors. It is front-loaded with main action but could be slightly more concise.

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 complexity (batch operation, multiple fields, error types), description covers return structure, error types, parameter details, and behavioral notes. No reliance on output schema needed.

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?

Input schema has 3 parameters: relationships (array), rollback_on_error (boolean), semantic_validation (string). Description provides full item shape with all fields and aliases, and explains rollback default. Schema coverage is 0% but description compensates completely.

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 states 'Add multiple relationships to the active model in one call' and contrasts with the sibling 'add_relationship' tool, clearly indicating this is a batch version.

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 that each item supports fields from add_relationship and provides notes on ID uniqueness and rollback behavior. It implicitly distinguishes from single-relationship tools but doesn't explicitly state when not to use.

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