Skip to main content
Glama
sharafutdinovdi

Revit Model MCP

List Relations

revit_list_relations
Read-onlyIdempotent

Read model object membership or dependencies for a specified relation, returning related element IDs, names, categories, families, and types; no matches yield an empty list.

Instructions

Read model object membership or dependencies.

Returns data with relation, source and elements containing IDs, names, categories, families and types; no related objects return elements=[]. relation is required: level-rooms, area-scheme-elements or view-template-dependents with source_name, or group-elements or nested-family with source_id. Obtain source names from revit_list_catalog and IDs from element queries. An invalid relation, missing or wrong source, missing document, read failure or timeout raises an error; partial data is not returned.

If more than one Revit instance is running, document is required; otherwise any instance may respond. Non-empty skipped means the answer is incomplete; skippedCount includes entries beyond the first 100.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
documentNoCase-insensitive substring of the target active document title or file name. Reads require exactly one matching instance; omitted document requires exactly one running instance. Zero or multiple matches fail before publishing. revit_list_instances returns all matching instances, or all running instances when omitted.
relationYes
source_idNoPositive integer Revit ID of the source group for group-elements or family instance for nested-family. Default null is valid for name-based relations; these two ID-based relations require a value.
process_idNoExact positive Revit process ID. Takes precedence over document; if both are supplied they must agree.
source_nameNoExact, case-insensitive source name: a level for level-rooms, area scheme for area-scheme-elements, or view template for view-template-dependents. Default null is valid for ID-based relations; name-based relations require a value from the catalog.
timeout_secondsNoPositive integer seconds to wait for a result after pickup (120 when omitted); HTTP uses this as its response budget. Expiry raises an error, and increasing it does not override the add-in's execution limits.
pickup_timeout_secondsNoPositive integer seconds to wait for the add-in to pick up a local or SSH job (300 when omitted); ignored over HTTP. A pickup timeout raises an error but the pending job may still execute later.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv0.7.0
    • changedInput schema / properties / document / description
      Previous value: -"Case-insensitive substring of the target active document title or file name; default null leaves requests unaddressed, so any instance may respond. Use a unique substring with multiple instances; revit_list_instances instead returns all matching instances, or all instances when omitted."New value: +"Case-insensitive substring of the target active document title or file name. Reads require exactly one matching instance; omitted document requires exactly one running instance. Zero or multiple matches fail before publishing. revit_list_instances returns all matching instances, or all running instances when omitted."
    • addedInput schema / properties / process_id
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "integer"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "description": "Exact positive Revit process ID. Takes precedence over document; if both are supplied they must agree.",
      +  "title": "Process Id"
      +}
  2. Changed5 schema fields changedv0.1.1
    • addedInput schema / properties / document / description
      Added value: +"Case-insensitive substring of the target active document title or file name; default null leaves requests unaddressed, so any instance may respond. Use a unique substring with multiple instances; revit_list_instances instead returns all matching instances, or all instances when omitted."
    • addedInput schema / properties / pickup_timeout_seconds / description
      Added value: +"Positive integer seconds to wait for the add-in to pick up a local or SSH job (300 when omitted); ignored over HTTP. A pickup timeout raises an error but the pending job may still execute later."
    • addedInput schema / properties / source_id / description
      Added value: +"Positive integer Revit ID of the source group for group-elements or family instance for nested-family. Default null is valid for name-based relations; these two ID-based relations require a value."
    • addedInput schema / properties / source_name / description
      Added value: +"Exact, case-insensitive source name: a level for level-rooms, area scheme for area-scheme-elements, or view template for view-template-dependents. Default null is valid for ID-based relations; name-based relations require a value from the catalog."
    • addedInput schema / properties / timeout_seconds / description
      Added value: +"Positive integer seconds to wait for a result after pickup (120 when omitted); HTTP uses this as its response budget. Expiry raises an error, and increasing it does not override the add-in's execution limits."
  3. First observed

TDQS

A4.3/5.0
Behavior5/5

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

Beyond the readOnly/idempotent annotations, the description discloses the empty-result contract (elements=[]), the full failure surface (invalid relation, missing/wrong source, missing document, read failure, timeout), the no-partial-data guarantee, the 100-entry truncation with skipped/skippedCount, and the multi-instance document requirement. That is a rich behavioral profile annotations cannot supply.

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?

Front-loaded with purpose and return shape, then argument requirements, then error semantics and multi-instance caveats. Dense but each block earns its place; the multi-instance sentence mildly duplicates the document parameter description.

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?

For a 7-parameter read tool with an output schema and annotations, the description covers the missing pieces: relation vocabulary, source argument pairing, failure modes, truncation semantics, and instance-selection rules. Nothing an agent needs to call it correctly is absent.

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?

Schema coverage is 86%, so the schema already carries most parameter meaning. The description adds the one thing the schema cannot: the actual relation values and which of them pair with source_name versus source_id, plus the rule that document becomes mandatory when multiple Revit instances run. It repeats some schema text, keeping it out of 5 territory.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource ('Read model object membership or dependencies') and enumerates the exact relation types it can resolve, so an agent knows this is a relation/membership traversal tool rather than a generic element query. It does not, however, explicitly differentiate itself from nearby siblings such as revit_query_elements, revit_view_elements or revit_aggregate_elements.

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?

Gives clear context for use by naming each relation and the source argument each requires, plus routing guidance ('Obtain source names from revit_list_catalog and IDs from element queries'). No explicit when-not-to-use or statement of which sibling to prefer for overlapping element data, so it stops short of a 5.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.