Skip to main content
Glama
Model MCP

Model MCP

Aggregate Elements

revit_aggregate_elements
Read-onlyIdempotent

Summarize matching Revit elements by one or two fields with optional count, sum, and average totals for model quantity audits.

Instructions

Summarize matching elements by one or two fields, with optional sum and average. Lengths use mm, areas m2, volumes m3. For area totals, group by level and select the area scheme. skippedCount counts omissions.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "group_by": "<group_by>"
    },
    "name": "revit_aggregate_elements"
  }
}

Input Schema

NameRequiredDescriptionDefault
viewNoExact non-template view name; limits the search to that view.
levelNo
phaseNo
familyNo
worksetNo
documentNodoc: ID/path/title across several Revit instances.
group_byYesOne or two distinct fields (e.g. category, family, type, level) or exact localized parameter names.
sum_fieldNoNumeric field or parameter name to sum and average per group; lengths in mm, areas m2, volumes m3.
type_nameNoExact type name, case-insensitive.
categoriesNo
process_idNoRevit PID; must match document.
area_schemeNoExact area-scheme name, case-insensitive.
timeout_secondsNoResult wait in seconds.
parameter_filtersNoAND-combined filters: parameter (exact localized name), operator (equals, contains, greater, less, empty, not-empty, exists) and value. Numbers use mm, m2, m3 or display units.

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changedv3.0.0
    • changedInput schema / properties / document / description
      Previous value: -"Session documentId, full path, title/file substring; selects among several Revit instances."New value: +"doc: ID/path/title across several Revit instances."
    • changedInput schema / properties / process_id / description
      Previous value: -"Process ID; must also match document."New value: +"Revit PID; must match document."
    • changedInput schema / properties / timeout_seconds / description
      Previous value: -"Seconds to wait for a result (default 120)."New value: +"Result wait in seconds."
  2. Changed2 schema fields changedv2.1.0
    • changedInput schema / properties / document / description
      Previous value: -"Title or file name substring of the target document; needed when several Revit instances run."New value: +"Session documentId, full path, title/file substring; selects among several Revit instances."
    • changedInput schema / properties / process_id / description
      Previous value: -"Revit process ID; takes precedence over document."New value: +"Process ID; must also match document."
  3. Changed1 schema field changedv2.0.0
    • removedInput schema / properties / pickup_timeout_seconds
      Removed value: -{
      -  "default": 300,
      -  "description": "Seconds to wait for the add-in to pick up the job (default 300); unused over HTTP.",
      -  "type": "integer"
      -}
  4. Changed29 schema fields changedv0.10.0
    • changedInput schema / properties / area_scheme / description
      Previous value: -"Exact area-scheme name from the area-schemes catalog, matched case-insensitively. Default null applies no scheme filter; selecting a scheme restricts results to its areas and combines with the other filters."New value: +"Exact area-scheme name, case-insensitive."
    • removedInput schema / properties / area_scheme / title
      Removed value: -"Area Scheme"
    • removedInput schema / properties / categories / title
      Removed value: -"Categories"
    • changedInput schema / properties / document / description
      Previous 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."New value: +"Title or file name substring of the target document; needed when several Revit instances run."
    • removedInput schema / properties / document / title
      Removed value: -"Document"
    • removedInput schema / properties / family / title
      Removed value: -"Family"
    • changedInput schema / properties / group_by / description
      Previous value: -"Required list of one or two distinct system fields (e.g. category, family, type, level) or exact localized parameter names from the catalog; no default. Each combination produces a count, with numeric totals added by sum_field."New value: +"One or two distinct fields (e.g. category, family, type, level) or exact localized parameter names."
    • addedInput schema / properties / group_by / maxItems
      Added value: +2
    • addedInput schema / properties / group_by / minItems
      Added value: +1
    • removedInput schema / properties / group_by / title
      Removed value: -"Group By"
    • removedInput schema / properties / level / title
      Removed value: -"Level"
    • changedInput schema / properties / parameter_filters / description
      Previous value: -"AND-combined objects with an exact localized parameter name in parameter, an operator (equals, contains, greater, less, empty, not-empty, exists), and value for comparisons; default null applies no parameter filters. Numeric values use mm, m2, m3 or other document display units; contains requires text, and empty/not-empty/exists need no value."New value: +"AND-combined filters: parameter (exact localized name), operator (equals, contains, greater, less, empty, not-empty, exists) and value. Numbers use mm, m2, m3 or display units."
    • removedInput schema / properties / parameter_filters / title
      Removed value: -"Parameter Filters"
    • removedInput schema / properties / phase / title
      Removed value: -"Phase"
    • changedInput schema / properties / pickup_timeout_seconds / description
      Previous 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."New value: +"Seconds to wait for the add-in to pick up the job (default 300); unused over HTTP."
    • removedInput schema / properties / pickup_timeout_seconds / title
      Removed value: -"Pickup Timeout Seconds"
    • changedInput schema / properties / process_id / description
      Previous value: -"Exact positive Revit process ID. Takes precedence over document; if both are supplied they must agree."New value: +"Revit process ID; takes precedence over document."
    • removedInput schema / properties / process_id / title
      Removed value: -"Process Id"
    • changedInput schema / properties / sum_field / description
      Previous value: -"Numeric system field or exact localized parameter name to sum and average within each group. Default null omits numeric aggregation; lengths use mm, areas m2, volumes m3, and other quantities use the returned unit."New value: +"Numeric field or parameter name to sum and average per group; lengths in mm, areas m2, volumes m3."
    • removedInput schema / properties / sum_field / title
      Removed value: -"Sum Field"
    • changedInput schema / properties / timeout_seconds / description
      Previous 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."New value: +"Seconds to wait for a result (default 120)."
    • removedInput schema / properties / timeout_seconds / title
      Removed value: -"Timeout Seconds"
    • changedInput schema / properties / type_name / description
      Previous value: -"Exact type name to match, case-insensitively, combined with the other model filters. Default null applies no type filter; discover names with the family-types catalog."New value: +"Exact type name, case-insensitive."
    • removedInput schema / properties / type_name / title
      Removed value: -"Type Name"
    • changedInput schema / properties / view / description
      Previous value: -"Exact non-template view name from the views catalog, matched case-insensitively, to restrict the element collector. Default null searches the document without a view filter; combines with the other model filters."New value: +"Exact non-template view name; limits the search to that view."
    • removedInput schema / properties / view / title
      Removed value: -"View"
    • removedInput schema / properties / workset / title
      Removed value: -"Workset"
    • removedInput schema / title
      Removed value: -"revit_aggregate_elementsArguments"
    • removedOutput schema / title
      Removed value: -"revit_aggregate_elementsDictOutput"
  5. 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"
      +}
  6. Changed9 schema fields changedv0.1.1
    • addedInput schema / properties / area_scheme / description
      Added value: +"Exact area-scheme name from the area-schemes catalog, matched case-insensitively. Default null applies no scheme filter; selecting a scheme restricts results to its areas and combines with the other filters."
    • 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 / group_by / description
      Added value: +"Required list of one or two distinct system fields (e.g. category, family, type, level) or exact localized parameter names from the catalog; no default. Each combination produces a count, with numeric totals added by sum_field."
    • addedInput schema / properties / parameter_filters / description
      Added value: +"AND-combined objects with an exact localized parameter name in parameter, an operator (equals, contains, greater, less, empty, not-empty, exists), and value for comparisons; default null applies no parameter filters. Numeric values use mm, m2, m3 or other document display units; contains requires text, and empty/not-empty/exists need no value."
    • 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 / sum_field / description
      Added value: +"Numeric system field or exact localized parameter name to sum and average within each group. Default null omits numeric aggregation; lengths use mm, areas m2, volumes m3, and other quantities use the returned unit."
    • 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."
    • addedInput schema / properties / type_name / description
      Added value: +"Exact type name to match, case-insensitively, combined with the other model filters. Default null applies no type filter; discover names with the family-types catalog."
    • addedInput schema / properties / view / description
      Added value: +"Exact non-template view name from the views catalog, matched case-insensitively, to restrict the element collector. Default null searches the document without a view filter; combines with the other model filters."
  7. First observed

TDQS

A3.7/5.0
Behavior4/5

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

Annotations already establish read-only, idempotent, non-destructive behavior, and the description adds real value on top: unit conventions (mm, m2, m3) for sums and averages, and the meaning of `skippedCount` as a count of omissions. It does not mention timeout behavior or what happens if the grouping field is invalid, but the added context exceeds the annotation baseline.

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?

Four short sentences, front-loaded with the core operation before the caveats. Nothing is padding, though 'skippedCount counts omissions' is clipped to the point of ambiguity about what exactly is omitted.

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?

An output schema exists, so return values need not be explained, and the safety profile is covered by annotations. For a 14-parameter aggregation tool, the description covers grouping, units, the area-total recipe, and skipped-result accounting — enough to call it correctly, with only minor gaps around the filter parameters.

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

Parameters3/5

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

With 14 parameters at 64% schema description coverage, the schema does most of the work. The description reinforces `group_by` cardinality, `sum_field` units, and the area-scheme requirement, but the unit statement largely restates the schema's own `sum_field` text, and the remaining undocumented parameters (level, phase, family, workset, categories) get no elaboration.

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?

The description opens with a specific verb and resource plus scope: 'Summarize matching elements by one or two fields, with optional sum and average.' That distinguishes it from a plain listing tool, but it never names or contrasts with the obvious sibling (`revit_query_elements`) or explains what 'matching' is matched against.

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?

It gives one concrete routing hint — 'For area totals, group by level and select the area scheme' — which is genuinely useful context for a common case. It provides no general when-to-use/when-not guidance versus querying or capturing elements, so the agent must infer the boundary itself.

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

Deploy Server

Other Tools