Skip to main content
Glama
mk92at

pyrevit-mcp

by mk92at

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault

No arguments

Capabilities

Features and capabilities supported by this server

CapabilityDetails
tools
{
  "listChanged": false
}
prompts
{
  "listChanged": false
}
resources
{
  "subscribe": false,
  "listChanged": false
}
experimental
{}

Tools

Functions exposed to the LLM to take actions

NameDescription
get_statusA

Check if Revit is running and which document is open.

get_elementsA

Get elements from the active Revit model by category name.

Args: category: Revit category name, e.g. 'Walls', 'Doors', 'Rooms', 'Floors'. limit: Maximum number of elements to return (default 100).

get_element_propertiesB

Get all properties/parameters of a specific Revit element by its ID.

Args: element_id: The integer ID of the Revit element.

set_parameterA

Set a parameter value on a Revit element. Opens a Transaction, sets the value, commits.

If the instance has no parameter of that name, the element TYPE is tried. A type write changes every placed instance of that type; the response then contains scope='type', instances_affected and a warning. Warn the user before writing type parameters.

Args: element_id: The integer ID of the Revit element. parameter_name: The exact parameter name as shown in get_element_properties. value: The new value. Numeric values are in Revit internal units (feet); prefer writing text parameters or copy the format from old_value.

set_parametersA

Set many parameter values in ONE Revit transaction: one round trip and a single entry in Revit's undo history. Always prefer this over calling set_parameter in a loop.

Args: assignments: List of {"element_id": int, "parameter_name": str, "value": str}. Items are applied in order; failed items are reported per item, the rest are still written.

find_elementsA

Find elements of a category, optionally filtered by level and by a parameter value, and return the parameters you ask for in the same call.

Prefer this over calling get_elements and then get_element_properties per element.

Args: category: Revit category name, e.g. 'Doors'. Localized names work too. level: Only elements on this level, e.g. 'Level 2'. Omit for all levels. parameter: Parameter to filter on, e.g. 'Fire Rating'. Omit for no filter. operator: equals, not_equals, contains, not_contains, empty, not_empty, greater, less. 'empty' finds elements where the parameter is unset. value: Value to compare against. Not needed for empty/not_empty. Comparisons are against the DISPLAY value in project units: if the project shows millimetres, 1.2 m must be given as '1200'. include_params: Parameter names to return for each element, e.g. ['Fire Rating', 'Width']. Values come back in project units. limit: Maximum elements to return (default 50). 'matched' in the response is the true number of matches even when the list is capped.

get_categoriesA

List every element category available in the current model. Use this when a category name was rejected.

get_selectionA

Get the elements the user has currently selected in the Revit window.

set_selectionA

Select elements in the Revit window. An empty list clears the selection.

Args: element_ids: Integer IDs of the elements to select.

override_graphicsB

Colour elements in the active Revit view so they stand out visually.

Args: element_ids: Integer IDs of the elements to colour. color: A name (red, green, blue, yellow, orange, purple, cyan, magenta, pink, brown, gray, black, white) or a hex string like '#ff8800'.

isolate_elementsA

Temporarily hide everything except these elements in the active Revit view.

Args: element_ids: Integer IDs of the elements to keep visible.

reset_viewA

Undo colour overrides and temporary isolation in the active Revit view, bringing it back to its normal appearance.

color_by_parameterA

Colour every element of a category by its value of one parameter, one colour per distinct value, and get the legend back. Elements without a value are gray. Great for visual QA, e.g. doors by Fire Rating.

Args: category: Revit category name, e.g. 'Doors'. parameter: Parameter to colour by, instance or type, e.g. 'Fire Rating'. level: Only colour elements on this level. Omit for all levels.

list_parametersA

List which parameters a category's elements have: name, instance or type scope, data type, and whether they are writable. Read from a sample element. Use this before filtering or writing when unsure of exact names.

Args: category: Revit category name, e.g. 'Doors'.

get_levelsA

List all levels in the model with their elevations, sorted bottom to top.

get_viewsA

List the views in the model (plans, sections, 3D, schedules) with their ids. The active view is marked.

set_active_viewA

Switch the Revit window to another view.

Args: view_id: Id of the view to open, as returned by get_views.

get_model_infoA

Overview of the open model: title, path, project information, active view, and element counts for common categories.

get_warningsA

Model health check: every warning Revit currently reports, grouped by type with counts and sample element ids. Use override_graphics on the element_ids to show a warning group in the model.

export_imageA

Export the active Revit view as a PNG image and return the file path.

Args: width: Image width in pixels (200 to 4000, default 1600).

save_documentA

Save the model (or synchronize with central for workshared models). Unsaved changes are lost when Revit restarts, so save after important edits.

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources

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/mk92at/pyrevit-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server