Skip to main content
Glama

add_relationship

Create a relationship between two existing ArchiMate elements. Specify type, source, and target; optional properties for access or influence.

Instructions

Add a new ArchiMate relationship between two elements.

Both endpoints must already exist as elements in the active model.
Use `list_supported_types` to discover valid `relationship_type`,
`access_type`, and `influence_strength` values.

Args:
    relationship_type: A supported pyArchimate relationship type,
        without the `Relationship` suffix. Examples: `Assignment`,
        `Serving`, `Composition`, `Aggregation`, `Realization`,
        `Triggering`, `Flow`, `Access`, `Influence`,
        `Specialization`, `Association`. Note: Archi's "Used By"
        concept maps to `Serving`.
    source_id: ID of the source element.
    target_id: ID of the target element.
    name: Optional relationship name.
    description: Optional documentation text.
    properties: Optional custom property key-value pairs (string
        values).
    access_type: Required only for `Access` relationships. One of
        `Access`, `Read`, `Write`, `ReadWrite`.
    influence_strength: Required only for `Influence` relationships.
        One of `+`, `++`, `-`, `--`, or `0`-`10`.
    relationship_id: Optional stable relationship ID. When omitted a
        UUID is generated.

Returns:
    Success envelope with `data` shaped like a `RelationshipDetail`:
    `{id, name, type, description, properties, access_type,
    influence_strength, source_element_id, target_element_id}`.

Errors:
    `InvalidRelationshipTypeError` for an unknown
        `relationship_type`.
    `ElementNotFoundError` when `source_id` or `target_id` is
        unknown.
    `ModelNotFoundError` if no model is active.
    `ModelOperationError` for invalid relationship combinations,
        duplicate `relationship_id`, or unsupported access/influence
        values.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameNo
source_idYes
target_idYes
propertiesNo
access_typeNo
descriptionNo
is_directedNo
relationship_idNo
relationship_typeYes
influence_strengthNo
semantic_validationNowarn

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior5/5

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

Annotations already indicate it's a write operation (readOnlyHint=false), but the description adds substantial behavioral context: necessary preconditions, optional vs required parameters, special conditions for 'access_type' and 'influence_strength', return envelope shape, and specific error types. This goes well beyond the annotations.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is well-structured and front-loaded: a one-line summary, followed by preconditions, then guidance, then detailed but necessary parameter explanations, return type, and errors. Every sentence adds distinct value without redundancy. It is as concise as possible given the tool's complexity.

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 high complexity (11 parameters, 3 required, special conditions), the description covers all essential aspects: preconditions, parameter semantics, return structure, and error conditions. The output schema exists but the description still outlines the return shape, ensuring agents have a complete understanding.

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?

With 0% schema description coverage, the description carries the full burden and excels. It explains each parameter with examples, conditional requirements (e.g., 'access_type: Required only for Access relationships'), and maps Archi concepts like 'Used By' to 'Serving'. The rich detail compensates fully for the schema's lack of descriptions.

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 opens with a specific verb+resource: 'Add a new ArchiMate relationship between two elements.' This clearly distinguishes it from siblings like 'add_relationships' (which adds multiple) and 'update_relationship', making the tool's exact purpose unambiguous.

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 states preconditions ('Both endpoints must already exist') and directs to 'list_supported_types' for valid values. It implicitly guides when to use: for adding a single relationship, but does not explicitly contrast with 'add_relationships' for batch operations, so a minor gap exists.

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