Skip to main content
Glama

query_elements

Read-only

Filter and retrieve ArchiMate elements by type, name, or custom properties. Returns detailed element data including relationships for model analysis.

Instructions

Query elements in the active model with optional filters.

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

Supported filter keys:
    - `type` (str): Match elements with this exact ArchiMate type,
      e.g. `BusinessActor`, `ApplicationComponent`.
    - `name_contains` (str): Case-insensitive substring match
      against element name.
    - `properties_contain` (dict[str, str]): Match elements whose
      custom properties contain every provided key/value pair.

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

Returns:
    Success envelope with `data.elements`, a list of
    `ElementDetail` objects (`id`, `name`, `type`, `description`,
    `properties`, `folder`, `incoming_relationship_ids`,
    `outgoing_relationship_ids`).

Errors:
    `ModelNotFoundError` if no model is active.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
filter_criteriaYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior5/5

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

Beyond the readOnlyHint annotation, the description discloses that filters are AND-combined, unknown keys are ignored, possible errors (ModelNotFoundError), and details of the return structure. This adds substantial behavioral context.

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 with sections for description, supported filters, arguments, returns, and errors. Every sentence is informative and adds value without redundancy.

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 the complexity of filters, absence of schema descriptions, and presence of an output schema, the description provides comprehensive guidance on usage, parameters, return values, and error cases. It covers all necessary aspects for correct tool invocation.

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?

The input schema provides only a generic object for filter_criteria with no descriptions. The tool description fully compensates by listing supported keys (type, name_contains, properties_contain) and their semantics, adding meaning beyond 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 it queries elements in the active model with optional filters. It distinguishes from sibling tools like query_relationships, add_element, etc., which operate on different resources or actions.

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 when to use (querying elements with filters or listing all with empty {}) and notes that unknown keys are ignored. It does not explicitly mention alternatives or when not to use, but provides sufficient context for proper invocation.

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