Skip to main content
Glama

add_relationships

Batch-add multiple relationships to an active ArchiMate model in one call, with automatic rollback on error.

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`).

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

Behavior4/5

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

Beyond annotations (which are all false), the description details rollback behavior on error, lists error types, and specifies the return envelope structure. This adds meaningful context about the tool's behavior and safety, compensating for the lack of annotation hints.

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 a clear purpose, an example shape, argument list, return info, and errors. It is slightly verbose due to the inline example, but every sentence adds value and the information is front-loaded.

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?

The description covers input parameters (with one omission), return values, and errors. Given the tool has a small number of parameters and an output schema exists, the description is largely complete. It could mention prerequisite existence of an active model, but current coverage is sufficient.

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

Parameters4/5

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

With 0% schema description coverage, the description compensates by fully detailing the structure of the 'relationships' parameter, including aliases and optional fields, and specifying the default for 'rollback_on_error'. However, the 'semantic_validation' parameter is not mentioned, leaving one parameter undocumented.

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 the action 'Add multiple relationships' to the 'active model in one call', distinguishing it from the sibling 'add_relationship' which adds single relationships. The verb and resource are specific and unambiguous.

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

Usage Guidelines3/5

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

The description implies batch usage by saying 'in one call', but it does not explicitly state when to use this tool over calling 'add_relationship' multiple times or provide exclusions. It mentions that item fields match those of 'add_relationship', offering some guidance but lacking direct alternatives or context.

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