Skip to main content
Glama

query_relationships

Read-only

Retrieve relationships from the active ArchiMate model, filtering by type, source, or target element to find specific connections.

Instructions

Query relationships in the active model with optional filters.

All filters are AND-combined. Pass an empty `{}` to list every
relationship (equivalent to the
`pyarchimate://activemodel/relationships` resource).

Supported filter keys:
    - `type` (str): Match relationships with this exact pyArchimate
      relationship type, e.g. `Serving`, `Composition`,
      `Assignment`. The `Relationship` suffix is not used.
    - `source_id` (str): Match relationships whose source element
      UUID equals this value.
    - `target_id` (str): Match relationships whose target element
      UUID equals this value.

Args:
    filter_criteria: Dict containing zero or more of the keys
        above. Unknown keys are ignored.

Returns:
    Success envelope with `data.relationships`, a list of
    `RelationshipDetail` objects (`id`, `name`, `type`,
    `description`, `properties`, `access_type`,
    `influence_strength`, `source_element_id`,
    `target_element_id`).

Errors:
    `InvalidRelationshipTypeError` for an unknown `type`.
    `ModelNotFoundError` if no model is active.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
filter_criteriaYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior4/5

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

Annotations already indicate readOnlyHint=true. Description adds query behavior (AND, ignored keys), return object structure, and error types. Provides 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.

Conciseness5/5

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

Well-structured with clear sections. Each sentence provides necessary information: filter behavior, supported keys, arguments, returns, errors. No redundant content.

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?

Covers filter behavior, valid keys, return format, errors, and prerequisite (active model). Output schema exists, so return fields are documented. Complete for a query tool.

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 only defines filter_criteria as an object with additionalProperties true. Description enriches by listing valid keys (type, source_id, target_id), their types, and behavior (AND, unknown keys ignored). Fully compensates for 0% schema coverage.

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?

Description clearly states the tool queries relationships in the active model with optional filters. Verb 'Query' and resource 'relationships' are specific. It distinguishes from sibling tools like add_relationship or delete_relationship by focusing on querying.

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?

Describes how filters are AND-combined and how to list all relationships. Mentions error conditions. However, it does not explicitly compare with other query tools like query_elements or advise when to use this over alternatives.

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