Skip to main content
Glama

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault

No arguments

Instructions

Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.

Controls the running Autodesk Revit session with full Revit API access. Call status first. execute_csharp runs any C# against the live model: globals are uiapp, app, uidoc, doc, print(obj), mm(feet), ft(mm), id(long). Revit internal units are FEET. Each call runs in its own named transaction (undo with Ctrl+Z in Revit), and is rolled back on error. Pass transaction=false only when your code manages its own Transaction/TransactionGroup or opens/closes documents. Prefer one larger script over many small calls. Return values are converted to JSON (Elements become {id,name,category,type,level}). Developed by Dr Ibrahim M.A. Alaamri - https://www.linkedin.com/in/dribrahim-alameri/

Capabilities

Features and capabilities supported by this server

Protocol revision2025-11-25

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

Tools

Functions exposed to the LLM to take actions

NameDescription
aboutC

Server name, version, author, license and links.

statusA

Is Revit running with the bridge on? Revit version, active document, open documents.

execute_csharpA

Run any C# code inside Revit with FULL Revit API access (the main tool).

Write a C# script body (statements, optional return value;). Available globals: uiapp (UIApplication), app (Application), uidoc (UIDocument), doc (active Document), print(obj) to add output lines, mm(feet)->mm, ft(mm)->feet, id(long)->ElementId. Namespaces already imported: System, System.Linq, System.Collections.Generic, System.IO, System.Text, Autodesk.Revit.DB (+ .Architecture .Structure .Mechanical .Plumbing .Electrical), Autodesk.Revit.UI(.Selection). Revit internal units are feet. With transaction=true (default) the code runs inside one named transaction that is committed on success and rolled back on any exception; the user can undo it with Ctrl+Z. Use transaction=false for read-only code or when the code opens/closes/saves documents or manages its own transactions. Example: return new FilteredElementCollector(doc).OfClass(typeof(Wall)).Count();

document_infoA

Active document: title, path, units, levels, phases, worksharing, element counts by category.

list_elementsA

List element instances filtered by category name (e.g. 'Walls', 'Doors') or API class (e.g. 'Wall', 'FamilyInstance'), optionally only in the active view and/or by name substring.

get_parametersB

All instance parameters of one element (and its type parameters if include_type).

set_parametersB

Set one parameter on many elements (or on their types). Value is text: numbers for Double params use display units via SetValueString (e.g. '3000' mm), Integer/Yes-No as '1'/'0', ElementId as the id.

get_selectionC

Elements currently selected in Revit.

select_elementsC

Select elements in Revit (and zoom to them).

delete_elementsB

Delete elements (one undoable transaction). Returns all ids Revit removed, including dependents.

open_documentC

Open an .rvt/.rfa file (activates it in the UI by default).

new_documentA

Create a new project from a template (default template if empty) and activate it.

save_documentC

Save the active document, or Save As a new path.

export_view_imageB

Export the active view as a PNG image to path, so the result can be checked visually.

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources

TDQS

B3.4/5.0

Scored across 14 tools

Disambiguation4/5

Most tools have clearly distinct resource+action targets (list_elements, get_parameters, set_parameters, delete_elements, open/save/new_document). The only mild overlap is between status (Revit version, active doc, open docs), about (server metadata) and document_info (active doc details), which a careful reader can separate from the descriptions but could still momentarily confuse. execute_csharp is explicitly framed as the general-purpose escape hatch, which helps rather than muddies the set.

Naming Consistency4/5

The dominant convention is consistent snake_case verb_noun (list_elements, get_parameters, set_parameters, select_elements, delete_elements, open_document, export_view_image). The metadata tools 'status' and 'about' are noun-only and break the pattern, and 'execute_csharp' names a technology rather than an operation, but overall the set reads predictably.

Tool Count5/5

14 tools is squarely in the well-scoped band for a Revit bridge server. Each tool covers a distinct slice of the workflow (connection/inspection, element query, parameter read/write, selection, document lifecycle, export, raw API execution) with no filler.

Completeness4/5

The surface covers connection check, document lifecycle (open/new/save), element listing, parameter read/write, selection, deletion and visual verification. Notable omissions are element creation helpers, family/view management, document close, and no update/rename tool, but execute_csharp with full API access makes all of these reachable, so no true dead ends.

Maintenance

ActivityMaintained
ResponsivenessNo recent community issues