Open-source Revit MCP server: let Claude and other AI assistants read and edit BIM models, with human approval on every change.
Python aecai-agentsautodeskautomationbimclaudeifcmcpmcp-servermodel-context-protocolnavisworksrevitrevit-addinrevit-apirhino
feat(hub): extend ProviderTool metadata, implement ApprovalGate middleware & ActionPlan tools, register Navisworks/PowerBI, archive legacy server/tools/schemas
A. Sam Mohammadd5e6aca7ccbc
diff --git a/docs/tools-generated.md b/docs/tools-generated.mdindex 089a706..f92a4ef 100644--- a/docs/tools-generated.md+++ b/docs/tools-generated.md@@ -5,212 +5,257 @@This catalog lists all tools exposed by the AEC Model Bridge providers.> [!NOTE]-> The columns `Mutating?` and `Execution Type` display `?` and `async` respectively,-> as these metadata fields are not explicitly defined on the provider tools yet.+> The columns `Mutating?` and `Execution Type` display the actual metadata parsed+> from C# command specifications and provider capabilities.## AEC Mapper Provider| Tool Name | Description | Mutating? | Execution Type || --- | --- | --- | --- |-| `aec_map_workspace_path` | Map and convert workspace paths between relative formats, Windows absolute format, and POSIX path format. | ? | async |-| `aec_register_mapping` | Register custom relationship links between different BIM workflows (e. | ? | async |-| `aec_translate_id` | Translate an element identifier between Revit UniqueId/GUID, IFC GlobalId, and custom registered workflows. | ? | async |+| `aec_map_workspace_path` | Map and convert workspace paths between relative formats, Windows absolute format, and POSIX path format. | No | sync |+| `aec_register_mapping` | Register custom relationship links between different BIM workflows (e. | No | sync |+| `aec_translate_id` | Translate an element identifier between Revit UniqueId/GUID, IFC GlobalId, and custom registered workflows. | No | sync |++## Approval Provider++| Tool Name | Description | Mutating? | Execution Type |+| --- | --- | --- | --- |+| `approve_plan` | Approve a pending ActionPlan for execution. | No | sync |+| `list_pending_plans` | List all pending ActionPlans waiting for review. | No | sync |+| `plan_actions` | Create a draft ActionPlan of proposed modifications, capturing their before-states. | No | sync |+| `reject_plan` | Reject and archive a pending ActionPlan. | No | sync |+| `rollback_plan` | Rollback an executed ActionPlan using inverse values. | No | sync |## Autodesk Data Provider| Tool Name | Description | Mutating? | Execution Type || --- | --- | --- | --- |-| `autodesk_data_auth_status` | Get Autodesk OAuth authentication status. | ? | async |-| `autodesk_data_checkout_version` | Checkout Autodesk version metadata. | ? | async |-| `autodesk_data_create_issue` | Compatibility alias for create_topic. | ? | async |-| `autodesk_data_create_topic` | Create a BCF-compatible issue/topic through a configured endpoint. | ? | async |-| `autodesk_data_get_version_metadata` | Read Autodesk item/version metadata. | ? | async |-| `autodesk_data_health` | Check Autodesk Data provider health. | ? | async |-| `autodesk_data_list_hubs` | List Autodesk Construction Cloud hubs. | ? | async |-| `autodesk_data_list_items` | List Autodesk items in a project folder or container. | ? | async |-| `autodesk_data_list_projects` | List Autodesk projects in a hub. | ? | async |-| `autodesk_data_oauth_exchange_code` | Exchange an Autodesk OAuth authorization code. | ? | async |-| `autodesk_data_oauth_refresh` | Refresh the Autodesk OAuth access token. | ? | async |-| `autodesk_data_oauth_start` | Generate an Autodesk OAuth authorization URL using PKCE. | ? | async |+| `autodesk_data_auth_status` | Get Autodesk OAuth authentication status. | No | sync |+| `autodesk_data_checkout_version` | Checkout Autodesk version metadata. | No | sync |+| `autodesk_data_create_issue` | Compatibility alias for create_topic. | No | sync |+| `autodesk_data_create_topic` | Create a BCF-compatible issue/topic through a configured endpoint. | No | sync |+| `autodesk_data_get_version_metadata` | Read Autodesk item/version metadata. | No | sync |+| `autodesk_data_health` | Check Autodesk Data provider health. | No | sync |+| `autodesk_data_list_hubs` | List Autodesk Construction Cloud hubs. | No | sync |+| `autodesk_data_list_items` | List Autodesk items in a project folder or container. | No | sync |+| `autodesk_data_list_projects` | List Autodesk projects in a hub. | No | sync |+| `autodesk_data_oauth_exchange_code` | Exchange an Autodesk OAuth authorization code. | No | sync |+| `autodesk_data_oauth_refresh` | Refresh the Autodesk OAuth access token. | No | sync |+| `autodesk_data_oauth_start` | Generate an Autodesk OAuth authorization URL using PKCE. | No | sync |## IFC Provider| Tool Name | Description | Mutating? | Execution Type || --- | --- | --- | --- |-| `ifc_get_bounding_box` | Get bounding box dimensions and placement information for a specific element. | ? | async |-| `ifc_get_metadata` | Get file schema, header metadata, units, and georeferencing summary from an IFC file. | ? | async |-| `ifc_get_properties` | Get property sets, quantities, and direct attributes for a specific element in an IFC file. | ? | async |-| `ifc_get_spatial_structure` | Get the spatial hierarchy (Project -> Site -> Building -> Storey -> Element Types/Counts) from an IFC file. | ? | async |-| `ifc_health` | Check status of IfcOpenShell and get version info. | ? | async |-| `ifc_query_elements` | Query elements by IFC class, GUID, name, or simple property name/value criteria. | ? | async |-| `ifc_validate` | Perform schema validation on the IFC file and return errors/warnings list. | ? | async |+| `ifc_get_bounding_box` | Get bounding box dimensions and placement information for a specific element. | No | sync |+| `ifc_get_metadata` | Get file schema, header metadata, units, and georeferencing summary from an IFC file. | No | sync |+| `ifc_get_properties` | Get property sets, quantities, and direct attributes for a specific element in an IFC file. | No | sync |+| `ifc_get_spatial_structure` | Get the spatial hierarchy (Project -> Site -> Building -> Storey -> Element Types/Counts) from an IFC file. | No | sync |+| `ifc_health` | Check status of IfcOpenShell and get version info. | No | sync |+| `ifc_query_elements` | Query elements by IFC class, GUID, name, or simple property name/value criteria. | No | sync |+| `ifc_validate` | Perform schema validation on the IFC file and return errors/warnings list. | No | sync |## Job Provider| Tool Name | Description | Mutating? | Execution Type || --- | --- | --- | --- |-| `job_cancel` | Cancel a running or queued background job. | ? | async |-| `job_status` | Get the status, progress, results, or error details of a background job. | ? | async |+| `job_cancel` | Cancel a running or queued background job. | No | sync |+| `job_status` | Get the status, progress, results, or error details of a background job. | No | sync |## Mcp Proxy Provider*No tools available for this provider.*+## Navisworks Provider++| Tool Name | Description | Mutating? | Execution Type |+| --- | --- | --- | --- |+| `navisworks_activate_viewpoint` | Activate a saved viewpoint by Guid. | No | sync |+| `navisworks_append_file` | Append a file (e. | No | sync |+| `navisworks_create_viewpoint` | Create a new saved viewpoint from the current view. | Yes | sync |+| `navisworks_get_clash_results` | Get results for a clash test by Guid. | No | sync |+| `navisworks_get_document_info` | Get info about the active Navisworks document. | No | sync |+| `navisworks_get_model_tree` | Get the model hierarchy tree in Navisworks. | No | sync |+| `navisworks_get_selection` | Get active selection items in Navisworks. | No | sync |+| `navisworks_health` | Check if Navisworks is running and get status information. | No | sync |+| `navisworks_invoke_method` | Invoke a C# method in Navisworks via reflection. | Yes | sync |+| `navisworks_list_clash_tests` | List clash tests defined in Clash Detective. | No | sync |+| `navisworks_list_viewpoints` | List saved viewpoints. | No | sync |+| `navisworks_reflect_get` | Get a C# property value from a Navisworks object via reflection. | No | sync |+| `navisworks_reflect_set` | Set a C# property value on a Navisworks object via reflection. | Yes | sync |+| `navisworks_refresh` | Refresh all updated files in the active document. | No | sync |+| `navisworks_run_clash_test` | Run a clash test by Guid. | No | sync |+## Revit Provider| Tool Name | Description | Mutating? | Execution Type || --- | --- | --- | --- |-| `revit_apply_view_template` | Apply view template to a view. | ? | async |-| `revit_batch_create_sheets_from_csv` | Create multiple sheets from a CSV file. | ? | async |-| `revit_batch_set_parameters` | Set a parameter value for multiple elements. | ? | async |-| `revit_batch_set_parameters_by_filter` | Set a parameter value on all elements matching a filter (category, type, level, or parameter value). | ? | async |-| `revit_calculate_material_quantities` | Calculate material volumes for a category. | ? | async |-| `revit_change_element_type` | Swap all instances of one element type to another type. | ? | async |-| `revit_check_clashes` | Check clashes between categories. | ? | async |-| `revit_close_document` | Close active document. | ? | async |-| `revit_convert_to_group` | Convert elements into a group. | ? | async |-| `revit_copy_element` | Copy an element. | ? | async |-| `revit_create_3d_view` | Create a new 3D view. | ? | async |-| `revit_create_beam` | Create structural beam. | ? | async |-| `revit_create_column` | Create structural column. | ? | async |-| `revit_create_conduit` | Create electrical conduit. | ? | async |-| `revit_create_dimension` | Create linear dimension between elements. | ? | async |-| `revit_create_duct` | Create duct. | ? | async |-| `revit_create_floor` | Create a floor in Revit with a rectangular or custom boundary. | ? | async |-| `revit_create_floor_plan_view` | Create a floor plan view for a level. | ? | async |-| `revit_create_foundation` | Create foundation. | ? | async |-| `revit_create_grid` | Create a grid line in Revit. | ? | async |-| `revit_create_group` | Create a group. | ? | async |-| `revit_create_level` | Create a new level in Revit. | ? | async |-| `revit_create_material` | Create a new material with color and properties. | ? | async |-| `revit_create_new_document` | Create new project. | ? | async |-| `revit_create_pipe` | Create pipe. | ? | async |-| `revit_create_project_parameter` | Create a new project parameter. | ? | async |-| `revit_create_roof` | Create a roof in Revit. | ? | async |-| `revit_create_room` | Create a room at a specific point on a level. | ? | async |-| `revit_create_schedule` | Create a schedule. | ? | async |-| `revit_create_section_view` | Create a section view. | ? | async |-| `revit_create_shared_parameter` | Create a new shared parameter. | ? | async |-| `revit_create_sheet` | Create a new sheet. | ? | async |-| `revit_create_tag` | Tag an element. | ? | async |-| `revit_create_text_note` | Create a text note. | ? | async |-| `revit_create_wall` | Create a wall in Revit between two points. | ? | async |-| `revit_delete_element` | Delete an element by ID. | ? | async |-| `revit_delete_sheet` | Delete a sheet. | ? | async |-| `revit_duplicate_sheet` | Duplicate a sheet. | ? | async |-| `revit_edit_family` | Open a family for editing. | ? | async |-| `revit_execute_python` | Execute arbitrary Python/IronPython code inside Revit with broad access to the public Revit API. | ? | async |-| `revit_export_dwg` | Export view to DWG. | ? | async |-| `revit_export_ifc` | Export to IFC. | ? | async |-| `revit_export_image` | Export view to Image. | ? | async |-| `revit_export_navisworks` | Export to NWC. | ? | async |-| `revit_get_categories` | List Revit categories. | ? | async |-| `revit_get_design_options` | Get design options. | ? | async |-| `revit_get_document_info` | Get information about the active Revit document. | ? | async |-| `revit_get_element_bounding_box` | Get element bounding box. | ? | async |-| `revit_get_element_geometry` | Get geometric data for an element: location point or curve endpoints, bounding box, level, area, volume, and length. | ? | async |-| `revit_get_element_parameters` | Get all parameters of an element. | ? | async |-| `revit_get_element_type` | Find element types/families. | ? | async |-| `revit_get_elements_by_type` | Get element IDs and key parameters, filtered by type, category, and/or level. | ? | async |-| `revit_get_group_members` | Get group members. | ? | async |-| `revit_get_link_instances` | Get link instances. | ? | async |-| `revit_get_parameter_value` | Get a specific parameter value. | ? | async |-| `revit_get_phase_filters` | Get phase filters. | ? | async |-| `revit_get_phases` | Get project phases. | ? | async |-| `revit_get_revision_sequences` | Get list of revision sequences. | ? | async |-| `revit_get_rvt_links` | Get RVT links. | ? | async |-| `revit_get_schedule_data` | Get schedule data. | ? | async |-| `revit_get_selection` | Get currently selected element IDs. | ? | async |-| `revit_get_sheet_info` | Get detailed information about a sheet. | ? | async |-| `revit_get_type_parameters` | Get type parameters for an element. | ? | async |-| `revit_get_view_templates` | Get list of view templates. | ? | async |-| `revit_get_warnings` | Get current project warnings. | ? | async |-| `revit_get_worksets` | Get all worksets. | ? | async |-| `revit_health` | Check if Revit is running and get status information. | ? | async |-| `revit_invoke_method` | Invoke any Revit API method dynamically using Reflection. | ? | async |-| `revit_list_elements` | List elements by category (Walls, Floors, Roofs, Doors, Windows, etc. | ? | async |-| `revit_list_families` | List all loaded families and their types. | ? | async |-| `revit_list_levels` | List all levels in the Revit project. | ? | async |-| `revit_list_project_parameters` | List project parameters. | ? | async |-| `revit_list_shared_parameters` | List shared parameters in the document. | ? | async |-| `revit_list_sheets` | List all sheets. | ? | async |-| `revit_list_titleblocks` | List available titleblocks. | ? | async |-| `revit_list_views` | List all views in the Revit project. | ? | async |-| `revit_mirror_element` | Mirror an element. | ? | async |-| `revit_move_element` | Move an element. | ? | async |-| `revit_pin_element` | Pin an element. | ? | async |-| `revit_place_door` | Place a door in a wall. | ? | async |-| `revit_place_family_instance` | Place a family instance (e. | ? | async |-| `revit_place_viewport_on_sheet` | Place a view on a sheet. | ? | async |-| `revit_place_window` | Place a window in a wall. | ? | async |-| `revit_populate_titleblock` | Populate titleblock parameters. | ? | async |-| `revit_reflect_get` | Get any Revit property value dynamically. | ? | async |-| `revit_reflect_set` | Set any Revit property value dynamically. | ? | async |-| `revit_relinquish_all` | Relinquish all elements and worksets. | ? | async |-| `revit_render_3d` | Render 3D view to image. | ? | async |-| `revit_renumber_sheets` | Batch renumber sheets. | ? | async |-| `revit_replace_family_type` | Replace all instances of one family/type combination with another, identified by name. | ? | async |-| `revit_rotate_element` | Rotate an element. | ? | async |-| `revit_save_document` | Save the current Revit document. | ? | async |-| `revit_set_element_material` | Set material for an element or specific face. | ? | async |-| `revit_set_parameter_value` | Set a parameter value for an element. | ? | async |-| `revit_set_selection` | Set selection by element IDs. | ? | async |-| `revit_set_type_parameter` | Set a type parameter value. | ? | async |-| `revit_sync_to_central` | Sync to central model. | ? | async |-| `revit_tag_all_in_view` | Tag all elements of a category in view. | ? | async |-| `revit_ungroup` | Ungroup a group. | ? | async |-| `revit_unpin_element` | Unpin an element. | ? | async |+| `revit_apply_view_template` | Apply view template to a view. | Yes | sync |+| `revit_batch_create_sheets_from_csv` | Create multiple sheets from a CSV file. | Yes | sync |+| `revit_batch_set_parameters` | Set a parameter value for multiple elements. | Yes | sync |+| `revit_batch_set_parameters_by_filter` | Set a parameter value on all elements matching a filter (category, type, level, or parameter value). | Yes | sync |+| `revit_calculate_material_quantities` | Calculate material volumes for a category. | No | sync |+| `revit_change_element_type` | Swap all instances of one element type to another type. | Yes | sync |+| `revit_check_clashes` | Check clashes between categories. | No | sync |+| `revit_close_document` | Close active document. | Yes | sync |+| `revit_convert_to_group` | Convert elements into a group. | Yes | sync |+| `revit_copy_element` | Copy an element. | Yes | sync |+| `revit_create_3d_view` | Create a new 3D view. | Yes | sync |+| `revit_create_beam` | Create structural beam. | Yes | sync |+| `revit_create_column` | Create structural column. | Yes | sync |+| `revit_create_conduit` | Create electrical conduit. | Yes | sync |+| `revit_create_dimension` | Create linear dimension between elements. | Yes | sync |+| `revit_create_duct` | Create duct. | Yes | sync |+| `revit_create_floor` | Create a floor in Revit with a rectangular or custom boundary. | Yes | sync |+| `revit_create_floor_plan_view` | Create a floor plan view for a level. | Yes | sync |+| `revit_create_foundation` | Create foundation. | Yes | sync |+| `revit_create_grid` | Create a grid line in Revit. | Yes | sync |+| `revit_create_group` | Create a group. | Yes | sync |+| `revit_create_level` | Create a new level in Revit. | Yes | sync |+| `revit_create_material` | Create a new material with color and properties. | Yes | sync |+| `revit_create_new_document` | Create new project. | Yes | sync |+| `revit_create_pipe` | Create pipe. | Yes | sync |+| `revit_create_project_parameter` | Create a new project parameter. | Yes | sync |+| `revit_create_roof` | Create a roof in Revit. | Yes | sync |+| `revit_create_room` | Create a room at a specific point on a level. | Yes | sync |+| `revit_create_schedule` | Create a schedule. | Yes | sync |+| `revit_create_section_view` | Create a section view. | Yes | sync |+| `revit_create_shared_parameter` | Create a new shared parameter. | Yes | sync |+| `revit_create_sheet` | Create a new sheet. | Yes | sync |+| `revit_create_tag` | Tag an element. | Yes | sync |+| `revit_create_text_note` | Create a text note. | Yes | sync |+| `revit_create_wall` | Create a wall in Revit between two points. | Yes | sync |+| `revit_delete_element` | Delete an element by ID. | Yes | sync |+| `revit_delete_sheet` | Delete a sheet. | Yes | sync |+| `revit_duplicate_sheet` | Duplicate a sheet. | Yes | sync |+| `revit_edit_family` | Open a family for editing. | Yes | sync |+| `revit_execute_python` | Execute arbitrary Python/IronPython code inside Revit with broad access to the public Revit API. | Yes | sync |+| `revit_export_dwg` | Export view to DWG. | No | sync |+| `revit_export_ifc` | Export to IFC. | No | sync |+| `revit_export_image` | Export view to Image. | No | sync |+| `revit_export_navisworks` | Export to NWC. | No | sync |+| `revit_extract_snapshot` | Extract a semantic BIM snapshot of the active document. | No | sync |+| `revit_get_categories` | List Revit categories. | No | sync |+| `revit_get_design_options` | Get design options. | No | sync |+| `revit_get_document_info` | Get information about the active Revit document. | No | sync |+| `revit_get_element_bounding_box` | Get element bounding box. | No | sync |+| `revit_get_element_geometry` | Get geometric data for an element: location point or curve endpoints, bounding box, level, area, volume, and length. | No | sync |+| `revit_get_element_parameters` | Get all parameters of an element. | No | sync |+| `revit_get_element_type` | Find element types/families. | No | sync |+| `revit_get_elements_by_type` | Get element IDs and key parameters, filtered by type, category, and/or level. | No | sync |+| `revit_get_group_members` | Get group members. | No | sync |+| `revit_get_link_instances` | Get link instances. | No | sync |+| `revit_get_parameter_value` | Get a specific parameter value. | No | sync |+| `revit_get_phase_filters` | Get phase filters. | No | sync |+| `revit_get_phases` | Get project phases. | No | sync |+| `revit_get_revision_sequences` | Get list of revision sequences. | No | sync |+| `revit_get_rvt_links` | Get RVT links. | No | sync |+| `revit_get_schedule_data` | Get schedule data. | No | sync |+| `revit_get_selection` | Get currently selected element IDs. | No | sync |+| `revit_get_sheet_info` | Get detailed information about a sheet. | No | sync |+| `revit_get_snapshot_delta` | Get lists of unique IDs for elements added, modified, or deleted during the active session. | No | sync |+| `revit_get_type_parameters` | Get type parameters for an element. | No | sync |+| `revit_get_view_templates` | Get list of view templates. | No | sync |+| `revit_get_warnings` | Get current project warnings. | No | sync |+| `revit_get_worksets` | Get all worksets. | No | sync |+| `revit_health` | Check if Revit is running and get status information. | No | sync |+| `revit_invoke_method` | Invoke any Revit API method dynamically using Reflection. | Yes | sync |+| `revit_list_elements` | List elements by category (Walls, Floors, Roofs, Doors, Windows, etc. | No | sync |+| `revit_list_families` | List all loaded families and their types. | No | sync |+| `revit_list_levels` | List all levels in the Revit project. | No | sync |+| `revit_list_project_parameters` | List project parameters. | No | sync |+| `revit_list_shared_parameters` | List shared parameters in the document. | No | sync |+| `revit_list_sheets` | List all sheets. | No | sync |+| `revit_list_titleblocks` | List available titleblocks. | No | sync |+| `revit_list_views` | List all views in the Revit project. | No | sync |+| `revit_mirror_element` | Mirror an element. | Yes | sync |+| `revit_move_element` | Move an element. | Yes | sync |+| `revit_pin_element` | Pin an element. | Yes | sync |+| `revit_place_door` | Place a door in a wall. | Yes | sync |+| `revit_place_family_instance` | Place a family instance (e. | Yes | sync |+| `revit_place_viewport_on_sheet` | Place a view on a sheet. | Yes | sync |+| `revit_place_window` | Place a window in a wall. | Yes | sync |+| `revit_populate_titleblock` | Populate titleblock parameters. | No | sync |+| `revit_reflect_get` | Get any Revit property value dynamically. | No | sync |+| `revit_reflect_set` | Set any Revit property value dynamically. | Yes | sync |+| `revit_relinquish_all` | Relinquish all elements and worksets. | Yes | sync |+| `revit_render_3d` | Render 3D view to image. | No | sync |+| `revit_renumber_sheets` | Batch renumber sheets. | Yes | sync |+| `revit_replace_family_type` | Replace all instances of one family/type combination with another, identified by name. | Yes | sync |+| `revit_rotate_element` | Rotate an element. | Yes | sync |+| `revit_save_document` | Save the current Revit document. | Yes | sync |+| `revit_set_element_material` | Set material for an element or specific face. | Yes | sync |+| `revit_set_parameter_value` | Set a parameter value for an element. | Yes | sync |+| `revit_set_selection` | Set selection by element IDs. | Yes | sync |+| `revit_set_type_parameter` | Set a type parameter value. | Yes | sync |+| `revit_sync_to_central` | Sync to central model. | Yes | sync |+| `revit_tag_all_in_view` | Tag all elements of a category in view. | No | sync |+| `revit_ungroup` | Ungroup a group. | No | sync |+| `revit_unpin_element` | Unpin an element. | Yes | sync |## Rhino Provider| Tool Name | Description | Mutating? | Execution Type || --- | --- | --- | --- |-| `rhino_evaluate_definition` | Upload a Grasshopper definition, solve it against Resthopper-compatible trees, and return the compute response. | ? | async |-| `rhino_get_definition_io` | Upload a Grasshopper definition and return its Resthopper input/output metadata. | ? | async |-| `rhino_get_geometry_details` | Return detailed geometry metadata for a. | ? | async |-| `rhino_get_layers` | Return layer metadata for a. | ? | async |-| `rhino_health` | Check Rhino. | ? | async |-| `rhino_query_file_geometry` | Upload a. | ? | async |+| `rhino_boolean_difference` | Subtract cutter Breps from a base Brep; returns new object GUIDs. | No | sync |+| `rhino_boolean_union` | Boolean union a list of Brep objects by GUID; returns new object GUIDs. | No | sync |+| `rhino_clear_scene` | Delete all objects in the Rhino document, or only objects on a specific layer. | No | sync |+| `rhino_create_box` | Create a box (rectangular prism) from two corner points in metres. | No | sync |+| `rhino_create_cylinder` | Create a capped cylinder from base point, height, and radius in metres. | No | sync |+| `rhino_create_sphere` | Create a sphere by centre point and radius in metres. | No | sync |+| `rhino_generate_diagrid_tower` | Generate a parametric diagrid skyscraper with aluminum mullion sweeps and glass panel solids. | No | sync |+| `rhino_get_document_info` | Get the active Rhino document name, path, unit system, and object count. | No | sync |+| `rhino_get_lines` | Get all curves/lines from the active Rhino document. | No | sync |+| `rhino_get_scene` | Get all objects in the Rhino scene with their type, layer, and bounding box. | No | sync |+| `rhino_health` | Check if the Rhino bridge is running and healthy. | No | sync |+| `rhino_invoke_method` | Invoke a C# method on a Rhino object via reflection. | No | sync |+| `rhino_list_layers` | List all layers in the Rhino document with name, color, visibility, and lock state. | No | sync |+| `rhino_reflect_get` | Get a C# property value from a Rhino object via reflection. | No | sync |+| `rhino_reflect_set` | Set a C# property value on a Rhino object via reflection. | No | sync |+| `rhino_run_python` | Execute arbitrary IronPython code inside Rhino with full RhinoCommon access. | No | sync |+| `rhino_set_material` | Apply a material to objects by GUID list or by layer name. | No | sync |+| `rhino_set_view` | Set the active Rhino viewport display mode or projection. | No | sync |+| `rhino_transform_objects` | Move, rotate, or scale objects by GUID. | No | sync |## Semantic Graph Provider| Tool Name | Description | Mutating? | Execution Type || --- | --- | --- | --- |-| `graph_add_relation` | Add a typed relation between two existing nodes. | ? | async |-| `graph_audit_clashes` | Audit axis-aligned bounding boxes for clashes using a tolerance value. | ? | async |-| `graph_audit_disconnected` | Audit disconnected nodes or components using degree and connectivity rules. | ? | async |-| `graph_audit_structural_loads` | Audit structural load-bearing and support consistency using SUPPORTED_BY relations. | ? | async |-| `graph_compile` | Compile workspace model nodes and relations into the in-memory semantic graph. | ? | async |-| `graph_health` | Check graph provider health and current graph size. | ? | async |-| `graph_query_relations` | Query relations by node, related node, relation type, and direction. | ? | async |+| `graph_add_relation` | Add a typed relation between two existing nodes. | No | sync |+| `graph_audit_clashes` | Audit axis-aligned bounding boxes for clashes using a tolerance value. | No | sync |+| `graph_audit_disconnected` | Audit disconnected nodes or components using degree and connectivity rules. | No | sync |+| `graph_audit_structural_loads` | Audit structural load-bearing and support consistency using SUPPORTED_BY relations. | No | sync |+| `graph_compile` | Compile workspace model nodes and relations into the in-memory semantic graph. | No | sync |+| `graph_health` | Check graph provider health and current graph size. | No | sync |+| `graph_query_relations` | Query relations by node, related node, relation type, and direction. | No | sync |## Speckle Provider| Tool Name | Description | Mutating? | Execution Type || --- | --- | --- | --- |-| `speckle_auth_status` | Get Speckle OAuth authentication status. | ? | async |-| `speckle_checkout_version` | Checkout Speckle version metadata. | ? | async |-| `speckle_create_branch` | Create an isolated Speckle branch for compatibility with model workflows. | ? | async |-| `speckle_create_model` | Create an isolated Speckle model. | ? | async |-| `speckle_get_version_metadata` | Read Speckle version metadata. | ? | async |-| `speckle_health` | Check Speckle provider health. | ? | async |-| `speckle_list_models` | List Speckle models for a project. | ? | async |-| `speckle_list_projects` | List Speckle projects. | ? | async |-| `speckle_list_versions` | List Speckle versions for a model or branch. | ? | async |-| `speckle_merge_branch` | Compatibility alias for merge_model. | ? | async |-| `speckle_merge_model` | Merge one Speckle model or branch into another through GraphQL. | ? | async |-| `speckle_oauth_exchange_code` | Exchange a Speckle OAuth authorization code. | ? | async |-| `speckle_oauth_refresh` | Refresh the Speckle OAuth access token. | ? | async |-| `speckle_oauth_start` | Generate a Speckle OAuth authorization URL using PKCE. | ? | async |-| `speckle_publish_version` | Publish a Speckle version by creating a commit through GraphQL. | ? | async |-| `speckle_receive_object` | Receives data from a Speckle stream/project using local credentials. | ? | async |-| `speckle_send_object` | Sends generic data objects to a Speckle stream/project using local credentials. | ? | async |+| `speckle_auth_status` | Get Speckle OAuth authentication status. | No | sync |+| `speckle_checkout_version` | Checkout Speckle version metadata. | No | sync |+| `speckle_create_branch` | Create an isolated Speckle branch for compatibility with model workflows. | No | sync |+| `speckle_create_model` | Create an isolated Speckle model. | No | sync |+| `speckle_get_version_metadata` | Read Speckle version metadata. | No | sync |+| `speckle_health` | Check Speckle provider health. | No | sync |+| `speckle_list_models` | List Speckle models for a project. | No | sync |+| `speckle_list_projects` | List Speckle projects. | No | sync |+| `speckle_list_versions` | List Speckle versions for a model or branch. | No | sync |+| `speckle_merge_branch` | Compatibility alias for merge_model. | No | sync |+| `speckle_merge_model` | Merge one Speckle model or branch into another through GraphQL. | No | sync |+| `speckle_oauth_exchange_code` | Exchange a Speckle OAuth authorization code. | No | sync |+| `speckle_oauth_refresh` | Refresh the Speckle OAuth access token. | No | sync |+| `speckle_oauth_start` | Generate a Speckle OAuth authorization URL using PKCE. | No | sync |+| `speckle_publish_version` | Publish a Speckle version by creating a commit through GraphQL. | No | sync |+| `speckle_receive_object` | Receives data from a Speckle stream/project using local credentials. | No | sync |+| `speckle_send_object` | Sends generic data objects to a Speckle stream/project using local credentials. | No | sync |## SQLite Exporter Provider| Tool Name | Description | Mutating? | Execution Type || --- | --- | --- | --- |-| `exporter_db_health` | Check health and readiness of the local database exporter. | ? | async |-| `exporter_graph_to_sqlite` | Extract the active semantic network graph and dump its nodes, properties, and typed edges to a local SQLite database in the workspace. | ? | async |-| `exporter_to_sqlite` | Export a structured payload of BIM elements, parameters, and relationships to a local SQLite database in the workspace. | ? | async |+| `exporter_db_health` | Check health and readiness of the local database exporter. | No | sync |+| `exporter_graph_to_sqlite` | Extract the active semantic network graph and dump its nodes, properties, and typed edges to a local SQLite database in the workspace. | No | sync |+| `exporter_to_sqlite` | Export a structured payload of BIM elements, parameters, and relationships to a local SQLite database in the workspace. | No | sync |diff --git a/packages/mcp-server-revit/scripts/generate_tool_docs.py b/packages/mcp-server-revit/scripts/generate_tool_docs.pyindex 3afb7ab..e4ce6cf 100644--- a/packages/mcp-server-revit/scripts/generate_tool_docs.py+++ b/packages/mcp-server-revit/scripts/generate_tool_docs.py@@ -25,6 +25,8 @@ from revit_mcp_server.providers import (SemanticGraphProvider,SpeckleProvider,AutodeskDataProvider,+ NavisworksProvider,+ ApprovalProvider,)try:@@ -59,12 +61,14 @@ def main():except Exception as e:provider_instances.append((name, None, str(e)))+ add_provider("Approval", lambda: ApprovalProvider(workspace=workspace, registry=registry))add_provider("Revit", lambda: RevitProvider(workspace=workspace))add_provider("IFC", lambda: IfcProvider(workspace=workspace))add_provider("AEC Mapper", lambda: AECMapperProvider(workspace=workspace))add_provider("SQLite Exporter", lambda: SQLiteExporterProvider(workspace=workspace, registry=registry))add_provider("Job", lambda: JobProvider(manager=job_manager))add_provider("Rhino", lambda: RhinoProvider(workspace=workspace))+ add_provider("Navisworks", lambda: NavisworksProvider(workspace=workspace))add_provider("Semantic Graph", lambda: SemanticGraphProvider())add_provider("Speckle", lambda: SpeckleProvider(client_id="dummy"))add_provider("Autodesk Data", lambda: AutodeskDataProvider(client_id="dummy"))@@ -82,8 +86,8 @@ def main():"This catalog lists all tools exposed by the AEC Model Bridge providers.","","> [!NOTE]",- "> The columns `Mutating?` and `Execution Type` display `?` and `async` respectively,",- "> as these metadata fields are not explicitly defined on the provider tools yet.",+ "> The columns `Mutating?` and `Execution Type` display the actual metadata parsed",+ "> from C# command specifications and provider capabilities.",""]@@ -109,7 +113,9 @@ def main():output_lines.append("| --- | --- | --- | --- |")for t in sorted_tools:desc = get_first_sentence(t.description)- output_lines.append(f"| `{t.name}` | {desc} | ? | async |")+ mutating_str = "Yes" if t.is_mutating else "No"+ exec_str = t.execution_mode+ output_lines.append(f"| `{t.name}` | {desc} | {mutating_str} | {exec_str} |")output_lines.append("")# Write output filediff --git a/packages/mcp-server-revit/src/revit_mcp_server/__init__.py b/packages/mcp-server-revit/src/revit_mcp_server/__init__.pyindex da1a1ac..32064bc 100644--- a/packages/mcp-server-revit/src/revit_mcp_server/__init__.py+++ b/packages/mcp-server-revit/src/revit_mcp_server/__init__.py@@ -1,5 +1,5 @@"""AEC Model Bridge server entrypoint."""-from .server import run_server+from .mcp_server import run_mcp_server as run_server__all__ = ["run_server"]diff --git a/packages/mcp-server-revit/src/revit_mcp_server/config.py b/packages/mcp-server-revit/src/revit_mcp_server/config.pyindex 0328daa..91b5713 100644--- a/packages/mcp-server-revit/src/revit_mcp_server/config.py+++ b/packages/mcp-server-revit/src/revit_mcp_server/config.py@@ -53,6 +53,7 @@ class Config(BaseSettings):mode: BridgeMode = Field(default=BridgeMode.mock)audit_log: Path = Field(default_factory=lambda: Path("audit.log"))log_level: str = Field("INFO")+ approval_mode: str = Field(default="required")model_config = SettingsConfigDict(env_prefix="MCP_REVIT_",diff --git a/packages/mcp-server-revit/src/revit_mcp_server/schemas.py b/packages/mcp-server-revit/src/revit_mcp_server/legacy/schemas.pysimilarity index 100%rename from packages/mcp-server-revit/src/revit_mcp_server/schemas.pyrename to packages/mcp-server-revit/src/revit_mcp_server/legacy/schemas.pydiff --git a/packages/mcp-server-revit/src/revit_mcp_server/server.py b/packages/mcp-server-revit/src/revit_mcp_server/legacy/server.pysimilarity index 100%rename from packages/mcp-server-revit/src/revit_mcp_server/server.pyrename to packages/mcp-server-revit/src/revit_mcp_server/legacy/server.pydiff --git a/packages/mcp-server-revit/src/revit_mcp_server/tools/__init__.py b/packages/mcp-server-revit/src/revit_mcp_server/legacy/tools/__init__.pysimilarity index 100%rename from packages/mcp-server-revit/src/revit_mcp_server/tools/__init__.pyrename to packages/mcp-server-revit/src/revit_mcp_server/legacy/tools/__init__.pydiff --git a/packages/mcp-server-revit/src/revit_mcp_server/tools/document.py b/packages/mcp-server-revit/src/revit_mcp_server/legacy/tools/document.pysimilarity index 100%rename from packages/mcp-server-revit/src/revit_mcp_server/tools/document.pyrename to packages/mcp-server-revit/src/revit_mcp_server/legacy/tools/document.pydiff --git a/packages/mcp-server-revit/src/revit_mcp_server/tools/handlers.py b/packages/mcp-server-revit/src/revit_mcp_server/legacy/tools/handlers.pysimilarity index 98%rename from packages/mcp-server-revit/src/revit_mcp_server/tools/handlers.pyrename to packages/mcp-server-revit/src/revit_mcp_server/legacy/tools/handlers.pyindex df908ee..f21e6c3 100644--- a/packages/mcp-server-revit/src/revit_mcp_server/tools/handlers.py+++ b/packages/mcp-server-revit/src/revit_mcp_server/legacy/tools/handlers.py@@ -4,7 +4,7 @@ from datetime import datetimefrom pathlib import Pathfrom typing import Callable, Dict-from ..schemas import (+from revit_mcp_server.legacy.schemas import (BaselineDiffInput,BaselineDiffOutput,BaselineExportInput,@@ -27,7 +27,7 @@ from ..schemas import (SheetBatchInput,SheetBatchOutput,)-from ..security.workspace import WorkspaceMonitor+from revit_mcp_server.security.workspace import WorkspaceMonitorToolHandler = Callable[[dict, WorkspaceMonitor], dict]diff --git a/packages/mcp-server-revit/src/revit_mcp_server/tools/health.py b/packages/mcp-server-revit/src/revit_mcp_server/legacy/tools/health.pysimilarity index 100%rename from packages/mcp-server-revit/src/revit_mcp_server/tools/health.pyrename to packages/mcp-server-revit/src/revit_mcp_server/legacy/tools/health.pydiff --git a/packages/mcp-server-revit/src/revit_mcp_server/mcp_server.py b/packages/mcp-server-revit/src/revit_mcp_server/mcp_server.pyindex a8c0423..0ec743b 100644--- a/packages/mcp-server-revit/src/revit_mcp_server/mcp_server.py+++ b/packages/mcp-server-revit/src/revit_mcp_server/mcp_server.py@@ -27,6 +27,8 @@ from .providers import (JobProvider,SQLiteExporterProvider,McpProxyProvider,+ NavisworksProvider,+ ApprovalProvider,)from .security.workspace import WorkspaceMonitorfrom .security.audit import redact_data@@ -42,10 +44,13 @@ workspace = WorkspaceMonitor(config.allowed_directories)# Initialize registry and register providersregistry = ProviderRegistry()+approval_provider = ApprovalProvider(workspace=workspace, registry=registry)+registry.register(approval_provider)registry.register(RevitProvider(workspace=workspace))registry.register(IfcProvider(workspace=workspace))registry.register(AECMapperProvider(workspace=workspace))registry.register(SQLiteExporterProvider(workspace=workspace, registry=registry))+registry.register(NavisworksProvider(workspace=workspace))# Initialize Job Manager and Job Providerjob_manager = JobManager()@@ -118,6 +123,17 @@ async def call_tool(name: str, arguments: Any) -> list[TextContent]:text=f"Error: Unknown tool '{name}'")]+ # Approval Gate Middleware Check+ tool_def = registry.lookup_tool(name)+ if tool_def and tool_def.is_mutating:+ try:+ approval_provider.gate.check_tool_execution(name, arguments)+ except Exception as e:+ return [TextContent(+ type="text",+ text=f"Approval Gate Blocked: {str(e)}"+ )]+try:# Check if deferred execution is requested.run_async = False@@ -144,6 +160,15 @@ async def call_tool(name: str, arguments: Any) -> list[TextContent]:# Execute the tool on the providerresult = await provider.execute_tool(name, arguments)++ # If mutating tool and plan_id is provided, transition state to executed+ if tool_def and tool_def.is_mutating and isinstance(arguments, dict) and "plan_id" in arguments:+ plan_id = arguments["plan_id"]+ try:+ approval_provider.gate.update_plan_state(plan_id, "executed")+ except Exception:+ pass+redacted_result = redact_data(result)# Format the responsediff --git a/packages/mcp-server-revit/src/revit_mcp_server/providers/__init__.py b/packages/mcp-server-revit/src/revit_mcp_server/providers/__init__.pyindex 68ab36d..18f1db6 100644--- a/packages/mcp-server-revit/src/revit_mcp_server/providers/__init__.py+++ b/packages/mcp-server-revit/src/revit_mcp_server/providers/__init__.py@@ -11,6 +11,7 @@ from .cloud import SpeckleProvider, AutodeskDataProviderfrom .job_provider import JobProviderfrom .exporter import SQLiteExporterProviderfrom .proxy import McpProxyProvider+from .approval_provider import ApprovalProvider__all__ = ["AECProvider",@@ -28,4 +29,5 @@ __all__ = ["JobProvider","SQLiteExporterProvider","McpProxyProvider",+ "ApprovalProvider",]diff --git a/packages/mcp-server-revit/src/revit_mcp_server/providers/approval_provider.py b/packages/mcp-server-revit/src/revit_mcp_server/providers/approval_provider.pynew file mode 100644index 0000000..f9f9191--- /dev/null+++ b/packages/mcp-server-revit/src/revit_mcp_server/providers/approval_provider.py@@ -0,0 +1,142 @@+import logging+from typing import Any, Dict, List+from ..security.workspace import WorkspaceMonitor+from ..security.approval import ApprovalGate+from .base import AECProvider, ProviderTool+from ..config import config++logger = logging.getLogger(__name__)++class ApprovalProvider(AECProvider):+ def __init__(self, workspace: WorkspaceMonitor, registry: Any, approval_mode: str = config.approval_mode) -> None:+ self.workspace = workspace+ self.registry = registry+ # Use first allowed directory as workspace directory base+ workspace_base = workspace.allowed_directories[0] if workspace.allowed_directories else config.workspace_dir+ self.gate = ApprovalGate(workspace_base, approval_mode)++ def get_identity(self) -> str:+ return "approval"++ def get_capabilities(self) -> List[ProviderTool]:+ return self._capabilities++ async def check_health(self) -> Dict[str, Any]:+ return {"status": "healthy"}++ async def shutdown(self) -> None:+ pass++ async def execute_tool(self, name: str, arguments: Dict[str, Any]) -> Dict[str, Any]:+ if name == "plan_actions":+ actions = arguments.get("actions", [])+ before_states = []+ for action in actions:+ tool = action.get("tool")+ args = action.get("arguments", {})+ before_val = {}+ if tool == "revit_set_parameter_value":+ elem_id = args.get("element_id")+ param_name = args.get("parameter_name")+ try:+ read_tool = "revit_get_parameter_value"+ provider = self.registry.lookup_tool_provider(read_tool)+ if provider:+ res = await provider.execute_tool(read_tool, {+ "element_id": elem_id,+ "parameter_name": param_name+ })+ val = res.get("value")+ before_val = {str(elem_id): {param_name: val}}+ except Exception as e:+ logger.warning("Failed to get before-state for plan: %s", e)+ before_states.append(before_val)++ plan = self.gate.create_plan(actions, before_states)+ return plan++ elif name == "list_pending_plans":+ return {"plans": self.gate.list_pending_plans()}++ elif name == "approve_plan":+ plan_id = arguments.get("plan_id")+ return self.gate.update_plan_state(plan_id, "approved")++ elif name == "reject_plan":+ plan_id = arguments.get("plan_id")+ return self.gate.update_plan_state(plan_id, "rejected")++ elif name == "rollback_plan":+ plan_id = arguments.get("plan_id")+ async def execute_helper(t_name, t_args):+ prov = self.registry.lookup_tool_provider(t_name)+ if not prov:+ raise ValueError(f"Provider not found for tool {t_name}")+ return await prov.execute_tool(t_name, t_args)++ return self.gate.rollback_plan(plan_id, execute_helper)++ else:+ raise ValueError(f"Unknown approval tool '{name}'")++ _capabilities = [+ ProviderTool(+ name="plan_actions",+ description="Create a draft ActionPlan of proposed modifications, capturing their before-states.",+ inputSchema={+ "type": "object",+ "properties": {+ "actions": {+ "type": "array",+ "items": {+ "type": "object",+ "properties": {+ "tool": {"type": "string"},+ "arguments": {"type": "object"}+ },+ "required": ["tool", "arguments"]+ }+ }+ },+ "required": ["actions"]+ }+ ),+ ProviderTool(+ name="list_pending_plans",+ description="List all pending ActionPlans waiting for review.",+ inputSchema={"type": "object", "properties": {}}+ ),+ ProviderTool(+ name="approve_plan",+ description="Approve a pending ActionPlan for execution.",+ inputSchema={+ "type": "object",+ "properties": {+ "plan_id": {"type": "string"}+ },+ "required": ["plan_id"]+ }+ ),+ ProviderTool(+ name="reject_plan",+ description="Reject and archive a pending ActionPlan.",+ inputSchema={+ "type": "object",+ "properties": {+ "plan_id": {"type": "string"}+ },+ "required": ["plan_id"]+ }+ ),+ ProviderTool(+ name="rollback_plan",+ description="Rollback an executed ActionPlan using inverse values.",+ inputSchema={+ "type": "object",+ "properties": {+ "plan_id": {"type": "string"}+ },+ "required": ["plan_id"]+ }+ )+ ]diff --git a/packages/mcp-server-revit/src/revit_mcp_server/providers/base.py b/packages/mcp-server-revit/src/revit_mcp_server/providers/base.pyindex 262487a..9cf357f 100644--- a/packages/mcp-server-revit/src/revit_mcp_server/providers/base.py+++ b/packages/mcp-server-revit/src/revit_mcp_server/providers/base.py@@ -6,6 +6,10 @@ class ProviderTool(BaseModel):name: strdescription: strinput_schema: Dict[str, Any] = Field(..., alias="inputSchema")+ is_mutating: bool = False+ destructive: bool = False+ execution_mode: str = "sync"+ permissions: List[str] = Field(default_factory=list)class Config:populate_by_name = Truediff --git a/packages/mcp-server-revit/src/revit_mcp_server/providers/navisworks.py b/packages/mcp-server-revit/src/revit_mcp_server/providers/navisworks.pyindex bc00c72..745c4fa 100644--- a/packages/mcp-server-revit/src/revit_mcp_server/providers/navisworks.py+++ b/packages/mcp-server-revit/src/revit_mcp_server/providers/navisworks.py@@ -22,6 +22,14 @@ class NavisworksProvider(AECProvider):factory = bridge_factory or (lambda u, t=None: BridgeClient(u, token=t))self._bridge = factory(url, None)self._init_tool_mapping()+ self._enrich_tool_metadata()++ def _enrich_tool_metadata(self) -> None:+ mutating_verbs = {"set", "invoke", "delete", "create", "move", "copy", "rotate", "mirror"}+ for tool in self._capabilities:+ name_parts = tool.name.split("_")+ if any(verb in name_parts for verb in mutating_verbs):+ tool.is_mutating = Truedef get_identity(self) -> str:return "navisworks"@@ -60,6 +68,31 @@ class NavisworksProvider(AECProvider):def _init_tool_mapping(self):self._tool_mapping = {"navisworks_health": ("navisworks.health", lambda args: {}),+ "navisworks_get_document_info": ("navis.get_document_info", lambda args: {}),+ "navisworks_get_model_tree": ("navis.get_model_tree", lambda args: {+ "max_depth": args.get("max_depth", 2)+ }),+ "navisworks_get_selection": ("navis.get_selection", lambda args: {}),+ "navisworks_append_file": ("navis.append_file", lambda args: {+ "path": args.get("path")+ }),+ "navisworks_refresh": ("navis.refresh", lambda args: {}),+ "navisworks_list_viewpoints": ("navis.list_viewpoints", lambda args: {}),+ "navisworks_create_viewpoint": ("navis.create_viewpoint", lambda args: {+ "name": args.get("name", "New Viewpoint")+ }),+ "navisworks_activate_viewpoint": ("navis.activate_viewpoint", lambda args: {+ "guid": args.get("guid")+ }),+ "navisworks_list_clash_tests": ("navis.list_clash_tests", lambda args: {}),+ "navisworks_run_clash_test": ("navis.run_clash_test", lambda args: {+ "guid": args.get("guid")+ }),+ "navisworks_get_clash_results": ("navis.get_clash_results", lambda args: {+ "guid": args.get("guid"),+ "skip": args.get("skip", 0),+ "limit": args.get("limit", 50)+ }),"navisworks_invoke_method": ("navis.invoke_method", lambda args: {"class_name": args.get("class_name"),"method_name": args.get("method_name"),@@ -78,36 +111,19 @@ class NavisworksProvider(AECProvider):}_capabilities = [- ProviderTool(- name="navisworks_health",- description="Check if Navisworks is running and get status information",- inputSchema={"type": "object", "properties": {}, "required": []}- ),- ProviderTool(- name="navisworks_invoke_method",- description="Invoke a C# method in Navisworks via reflection",- inputSchema={"type": "object", "properties": {- "class_name": {"type": "string"},- "method_name": {"type": "string"},- "arguments": {"type": "array"},- "target_id": {"type": "string"}- }, "required": ["class_name", "method_name", "arguments"]}- ),- ProviderTool(- name="navisworks_reflect_get",- description="Get a C# property value from a Navisworks object via reflection",- inputSchema={"type": "object", "properties": {- "target_id": {"type": "string"},- "property_name": {"type": "string"}- }, "required": ["target_id", "property_name"]}- ),- ProviderTool(- name="navisworks_reflect_set",- description="Set a C# property value on a Navisworks object via reflection",- inputSchema={"type": "object", "properties": {- "target_id": {"type": "string"},- "property_name": {"type": "string"},- "value": {}- }, "required": ["target_id", "property_name", "value"]}- ),+ ProviderTool(name="navisworks_health", description="Check if Navisworks is running and get status information", inputSchema={"type": "object", "properties": {}, "required": []}),+ ProviderTool(name="navisworks_get_document_info", description="Get info about the active Navisworks document", inputSchema={"type": "object", "properties": {}, "required": []}),+ ProviderTool(name="navisworks_get_model_tree", description="Get the model hierarchy tree in Navisworks", inputSchema={"type": "object", "properties": {"max_depth": {"type": "integer", "default": 2}}, "required": []}),+ ProviderTool(name="navisworks_get_selection", description="Get active selection items in Navisworks", inputSchema={"type": "object", "properties": {}, "required": []}),+ ProviderTool(name="navisworks_append_file", description="Append a file (e.g. NWD, NWG, IFC) to the active document", inputSchema={"type": "object", "properties": {"path": {"type": "string"}}, "required": ["path"]}),+ ProviderTool(name="navisworks_refresh", description="Refresh all updated files in the active document", inputSchema={"type": "object", "properties": {}, "required": []}),+ ProviderTool(name="navisworks_list_viewpoints", description="List saved viewpoints", inputSchema={"type": "object", "properties": {}, "required": []}),+ ProviderTool(name="navisworks_create_viewpoint", description="Create a new saved viewpoint from the current view", inputSchema={"type": "object", "properties": {"name": {"type": "string", "default": "New Viewpoint"}}, "required": []}),+ ProviderTool(name="navisworks_activate_viewpoint", description="Activate a saved viewpoint by Guid", inputSchema={"type": "object", "properties": {"guid": {"type": "string"}}, "required": ["guid"]}),+ ProviderTool(name="navisworks_list_clash_tests", description="List clash tests defined in Clash Detective", inputSchema={"type": "object", "properties": {}, "required": []}),+ ProviderTool(name="navisworks_run_clash_test", description="Run a clash test by Guid", inputSchema={"type": "object", "properties": {"guid": {"type": "string"}}, "required": ["guid"]}),+ ProviderTool(name="navisworks_get_clash_results", description="Get results for a clash test by Guid", inputSchema={"type": "object", "properties": {"guid": {"type": "string"}, "skip": {"type": "integer", "default": 0}, "limit": {"type": "integer", "default": 50}}, "required": ["guid"]}),+ ProviderTool(name="navisworks_invoke_method", description="Invoke a C# method in Navisworks via reflection", inputSchema={"type": "object", "properties": {"class_name": {"type": "string"}, "method_name": {"type": "string"}, "arguments": {"type": "array"}, "target_id": {"type": "string"}}, "required": ["class_name", "method_name", "arguments"]}),+ ProviderTool(name="navisworks_reflect_get", description="Get a C# property value from a Navisworks object via reflection", inputSchema={"type": "object", "properties": {"target_id": {"type": "string"}, "property_name": {"type": "string"}}, "required": ["target_id", "property_name"]}),+ ProviderTool(name="navisworks_reflect_set", description="Set a C# property value on a Navisworks object via reflection", inputSchema={"type": "object", "properties": {"target_id": {"type": "string"}, "property_name": {"type": "string"}, "value": {}}, "required": ["target_id", "property_name", "value"]})]diff --git a/packages/mcp-server-revit/src/revit_mcp_server/providers/powerbi.py b/packages/mcp-server-revit/src/revit_mcp_server/providers/powerbi.pyindex 497d245..3effe15 100644--- a/packages/mcp-server-revit/src/revit_mcp_server/providers/powerbi.py+++ b/packages/mcp-server-revit/src/revit_mcp_server/providers/powerbi.py@@ -28,7 +28,7 @@ class PowerBIProvider(AECProvider):return "powerbi"def get_capabilities(self) -> List[ProviderTool]:- return self._capabilities+ return [self._capabilities[0]]async def check_health(self) -> Dict[str, Any]:if self.mode == BridgeMode.bridge:@@ -44,8 +44,8 @@ class PowerBIProvider(AECProvider):passasync def execute_tool(self, name: str, arguments: Dict[str, Any]) -> Dict[str, Any]:- if name not in self._tool_mapping:- raise ValueError(f"Unknown Power BI tool '{name}'")+ if name != "powerbi_health":+ raise ValueError(f"Tool '{name}' is disabled in health-only mode")bridge_tool, payload_builder = self._tool_mapping[name]payload = payload_builder(arguments)diff --git a/packages/mcp-server-revit/src/revit_mcp_server/providers/registry.py b/packages/mcp-server-revit/src/revit_mcp_server/providers/registry.pyindex 54e0809..f0b25c3 100644--- a/packages/mcp-server-revit/src/revit_mcp_server/providers/registry.py+++ b/packages/mcp-server-revit/src/revit_mcp_server/providers/registry.py@@ -33,3 +33,10 @@ class ProviderRegistry:if tool.name == tool_name:return providerreturn None++ def lookup_tool(self, tool_name: str) -> ProviderTool | None:+ for provider in self._providers.values():+ for tool in provider.get_capabilities():+ if tool.name == tool_name:+ return tool+ return Nonediff --git a/packages/mcp-server-revit/src/revit_mcp_server/providers/revit.py b/packages/mcp-server-revit/src/revit_mcp_server/providers/revit.pyindex eddfe84..aacf889 100644--- a/packages/mcp-server-revit/src/revit_mcp_server/providers/revit.py+++ b/packages/mcp-server-revit/src/revit_mcp_server/providers/revit.py@@ -9,7 +9,7 @@ from ..errors import BridgeErrorfrom ..bridge.client import BridgeClientfrom ..bridge.mock import MockBridgefrom ..security.workspace import WorkspaceMonitor-from ..tools import TOOL_HANDLERS+from ..legacy.tools import TOOL_HANDLERSfrom .base import AECProvider, ProviderToollogger = logging.getLogger(__name__)@@ -27,6 +27,17 @@ class RevitProvider(AECProvider):self.bridge_url = bridge_urlself._bridge = self._build_bridge(bridge_factory)self._init_tool_mapping()+ self._enrich_tool_metadata()++ def _enrich_tool_metadata(self) -> None:+ mutating_verbs = {"create", "place", "set", "delete", "save", "close", "renumber", "duplicate", "move", "copy", "rotate", "mirror", "pin", "unpin", "sync", "relinquish", "convert", "edit", "apply", "change", "replace", "invoke"}+ for tool in self._capabilities:+ name_parts = tool.name.split("_")+ if any(verb in name_parts for verb in mutating_verbs):+ tool.is_mutating = True+ if tool.name == "revit_execute_python":+ tool.is_mutating = True+ tool.destructive = Truedef get_identity(self) -> str:return "revit"@@ -417,10 +428,16 @@ class RevitProvider(AECProvider):"revit_get_element_geometry": ("revit.get_element_geometry", lambda args: {"element_id": args.get("element_id")}),+ "revit_extract_snapshot": ("revit.extract_snapshot", lambda args: {+ "dirty_only": args.get("dirty_only", False)+ }),+ "revit_get_snapshot_delta": ("revit.get_snapshot_delta", lambda args: {}),}# Define _capabilities schema list_capabilities = [+ ProviderTool(name="revit_extract_snapshot", description="Extract a semantic BIM snapshot of the active document. Streams to a JSON file in the workspace directory.", inputSchema={"type": "object", "properties": {"dirty_only": {"type": "boolean", "description": "Extract only added or modified elements tracked in this session", "default": False}}, "required": []}),+ ProviderTool(name="revit_get_snapshot_delta", description="Get lists of unique IDs for elements added, modified, or deleted during the active session.", inputSchema={"type": "object", "properties": {}, "required": []}),ProviderTool(name="revit_health", description="Check if Revit is running and get status information", inputSchema={"type": "object", "properties": {}, "required": []}),ProviderTool(name="revit_create_wall", description="Create a wall in Revit between two points", inputSchema={"type": "object", "properties": {"start_x": {"type": "number", "description": "Start point X coordinate in feet"}, "start_y": {"type": "number", "description": "Start point Y coordinate in feet"}, "start_z": {"type": "number", "description": "Start point Z coordinate in feet", "default": 0}, "end_x": {"type": "number", "description": "End point X coordinate in feet"}, "end_y": {"type": "number", "description": "End point Y coordinate in feet"}, "end_z": {"type": "number", "description": "End point Z coordinate in feet", "default": 0}, "height": {"type": "number", "description": "Wall height in feet", "default": 10}, "level": {"type": "string", "description": "Level name (e.g., 'L1', 'L2')", "default": "L1"}}, "required": ["start_x", "start_y", "end_x", "end_y"]}),ProviderTool(name="revit_create_floor", description="Create a floor in Revit with a rectangular or custom boundary", inputSchema={"type": "object", "properties": {"points": {"type": "array", "description": "Array of boundary points [{x, y, z}]. Minimum 3 points for a closed boundary.", "items": {"type": "object", "properties": {"x": {"type": "number"}, "y": {"type": "number"}, "z": {"type": "number", "default": 0}}, "required": ["x", "y"]}}, "level": {"type": "string", "description": "Level name", "default": "L1"}}, "required": ["points"]}),diff --git a/packages/mcp-server-revit/src/revit_mcp_server/security/approval.py b/packages/mcp-server-revit/src/revit_mcp_server/security/approval.pynew file mode 100644index 0000000..7407d0b--- /dev/null+++ b/packages/mcp-server-revit/src/revit_mcp_server/security/approval.py@@ -0,0 +1,154 @@+import uuid+import json+import logging+from datetime import datetime+from pathlib import Path+from typing import Dict, Any, List, Optional+from ..config import config+from ..errors import BridgeError++logger = logging.getLogger(__name__)++class ApprovalGate:+ def __init__(self, workspace_dir: Path, approval_mode: str = config.approval_mode) -> None:+ self.workspace_dir = workspace_dir+ self.approval_mode = approval_mode+ self.plans_dir = workspace_dir / "plans"+ self.plans_dir.mkdir(parents=True, exist_ok=True)++ def _get_plan_path(self, plan_id: str) -> Path:+ return self.plans_dir / f"{plan_id}.json"++ def load_plan(self, plan_id: str) -> Optional[Dict[str, Any]]:+ path = self._get_plan_path(plan_id)+ if not path.exists():+ return None+ try:+ with open(path, "r", encoding="utf-8") as f:+ return json.load(f)+ except Exception as e:+ logger.error("Failed to load plan %s: %s", plan_id, e)+ return None++ def save_plan(self, plan: Dict[str, Any]) -> None:+ plan_id = plan["plan_id"]+ path = self._get_plan_path(plan_id)+ try:+ with open(path, "w", encoding="utf-8") as f:+ json.dump(plan, f, indent=2)+ except Exception as e:+ logger.error("Failed to save plan %s: %s", plan_id, e)++ def create_plan(self, actions: List[Dict[str, Any]], before_states: List[Dict[str, Any]]) -> Dict[str, Any]:+ plan_id = f"plan_{uuid.uuid4().hex[:12]}"+ plan_actions = []+ for i, action in enumerate(actions):+ act_id = f"act_{uuid.uuid4().hex[:12]}"+ before = before_states[i] if i < len(before_states) else {}++ arguments = action.get("arguments", {})+ diff = {+ "type": "parameter_change" if "parameter_name" in arguments else "model_modification",+ "before": before,+ "after": arguments,+ "element_count": 1+ }+ plan_actions.append({+ "action_id": act_id,+ "tool": action.get("tool"),+ "arguments": arguments,+ "diff": diff,+ "state": "pending"+ })++ plan = {+ "plan_id": plan_id,+ "state": "pending",+ "created_at": datetime.utcnow().isoformat() + "Z",+ "actions": plan_actions,+ "is_reversible": True,+ "reversible_strategy": "inverse"+ }+ self.save_plan(plan)+ return plan++ def list_pending_plans(self) -> List[Dict[str, Any]]:+ plans = []+ for path in self.plans_dir.glob("*.json"):+ try:+ with open(path, "r", encoding="utf-8") as f:+ plan = json.load(f)+ if plan.get("state") == "pending":+ plans.append(plan)+ except Exception:+ continue+ return plans++ def update_plan_state(self, plan_id: str, state: str) -> Dict[str, Any]:+ plan = self.load_plan(plan_id)+ if not plan:+ raise ValueError(f"Plan {plan_id} not found")+ plan["state"] = state+ self.save_plan(plan)+ return plan++ def check_tool_execution(self, tool_name: str, arguments: Dict[str, Any]) -> None:+ """+ Interceptors check before execution.+ """+ if self.approval_mode != "required":+ return++ # Check if plan_id is provided+ plan_id = arguments.get("plan_id")+ if not plan_id:+ raise BridgeError(f"Approval mode is enabled. Mutating tool '{tool_name}' requires a valid 'plan_id' parameter.")++ plan = self.load_plan(plan_id)+ if not plan:+ raise BridgeError(f"Plan '{plan_id}' does not exist.")++ if plan.get("state") != "approved":+ raise BridgeError(f"Plan '{plan_id}' is in state '{plan.get('state')}', not 'approved'. Execution blocked.")++ def rollback_plan(self, plan_id: str, execute_fn) -> Dict[str, Any]:+ plan = self.load_plan(plan_id)+ if not plan:+ raise ValueError(f"Plan {plan_id} not found")+ if plan.get("state") != "executed":+ raise ValueError(f"Plan {plan_id} is in state '{plan.get('state')}', cannot rollback. Only executed plans can be rolled back.")++ errors = []+ for action in reversed(plan["actions"]):+ tool = action["tool"]+ before = action["diff"]["before"]+ if tool == "revit_set_parameter_value":+ elem_id = action["arguments"].get("element_id")+ param_name = action["arguments"].get("parameter_name")+ old_val = before.get(str(elem_id), {}).get(param_name)+ if old_val is not None:+ try:+ # Make sure to bypass or satisfy the approved state check+ # We temporarily set the plan state to 'approved' for the rollback calls+ plan["state"] = "approved"+ self.save_plan(plan)+ execute_fn("revit_set_parameter_value", {+ "element_id": elem_id,+ "parameter_name": param_name,+ "value": old_val,+ "plan_id": plan_id+ })+ except Exception as e:+ errors.append(f"Failed to rollback action {action.get('action_id')}: {e}")+ finally:+ plan["state"] = "executed"+ self.save_plan(plan)+ else:+ errors.append(f"Rollback not supported for tool {tool}")++ if errors:+ raise BridgeError(f"Rollback encountered errors: {'; '.join(errors)}")++ plan["state"] = "rolled_back"+ self.save_plan(plan)+ return plandiff --git a/packages/mcp-server-revit/src/revit_mcp_server/security/audit.py b/packages/mcp-server-revit/src/revit_mcp_server/security/audit.pyindex ac936e0..3b8683c 100644--- a/packages/mcp-server-revit/src/revit_mcp_server/security/audit.py+++ b/packages/mcp-server-revit/src/revit_mcp_server/security/audit.py@@ -4,7 +4,6 @@ from datetime import datetime, timezonefrom pathlib import Pathfrom typing import Any, Mapping-from ..schemas import HealthOutput_SECRET_KEYS = {"authorization",diff --git a/packages/mcp-server-revit/tests/helpers.py b/packages/mcp-server-revit/tests/helpers.pynew file mode 100644index 0000000..47c5860--- /dev/null+++ b/packages/mcp-server-revit/tests/helpers.py@@ -0,0 +1,115 @@+import asyncio+import io+import json+import logging+import sys+import threading+from typing import Callable, Dict, Any+from pathlib import Path++from revit_mcp_server.config import BridgeMode, Config, config+from revit_mcp_server.security.workspace import WorkspaceMonitor+from revit_mcp_server.security.audit import redact_data+from revit_mcp_server.providers import (+ ProviderRegistry,+ RevitProvider,+ IfcProvider,+ AECMapperProvider,+ JobProvider,+ SQLiteExporterProvider,+)+from revit_mcp_server.jobs import JobManager++class MCPServer:+ def __init__(+ self,+ config_obj: Config | None = None,+ bridge_factory: Callable[[str], Any] | None = None,+ **kwargs,+ ) -> None:+ if "config" in kwargs:+ config_obj = kwargs.pop("config")+ self.config = config_obj if config_obj is not None else config+ self.workspace = WorkspaceMonitor(self.config.allowed_directories)++ self._loop = asyncio.new_event_loop()+ self._loop_thread = threading.Thread(target=self._run_loop, daemon=True)+ self._loop_thread.start()++ self.registry = ProviderRegistry()+ self.revit_provider = RevitProvider(+ workspace=self.workspace,+ mode=self.config.mode,+ bridge_url=self.config.bridge_url,+ bridge_factory=bridge_factory+ )+ self.registry.register(self.revit_provider)+ self.registry.register(IfcProvider(workspace=self.workspace))+ self.registry.register(AECMapperProvider(workspace=self.workspace))+ self.registry.register(SQLiteExporterProvider(workspace=self.workspace, registry=self.registry))++ self.job_manager = JobManager()+ self.registry.register(JobProvider(manager=self.job_manager))++ def _run_loop(self) -> None:+ asyncio.set_event_loop(self._loop)+ self._loop.run_forever()++ def handle_tool(self, tool_name: str, payload: dict) -> dict:+ normalized_name = tool_name.replace(".", "_")+ provider = self.registry.lookup_tool_provider(normalized_name)+ if not provider:+ if tool_name.startswith("ifc") or tool_name.startswith("ifc."):+ provider = self.registry.get_provider("ifc")+ else:+ provider = self.registry.get_provider("revit")++ if provider is None:+ raise ValueError(f"Unknown tool {tool_name}")++ run_async = False+ idempotency_key = None+ if isinstance(payload, dict):+ args_copy = dict(payload)+ run_async = args_copy.pop("run_async", False)+ if isinstance(run_async, str):+ run_async = run_async.lower() in ("true", "1", "yes")+ run_async = bool(run_async)+ idempotency_key = args_copy.get("idempotency_key")++ try:+ if run_async:+ async def run_tool_job(context=None):+ return await provider.execute_tool(tool_name, payload)++ future = asyncio.run_coroutine_threadsafe(+ self.job_manager.submit(run_tool_job, idempotency_key=idempotency_key),+ self._loop+ )+ response = future.result()+ response = response.to_dict()+ else:+ future = asyncio.run_coroutine_threadsafe(+ provider.execute_tool(tool_name, payload),+ self._loop+ )+ response = future.result()++ response = redact_data(response)+ except Exception as exc:+ response = {"status": "error", "message": redact_data(str(exc))}++ return response++ def shutdown(self) -> None:+ future = asyncio.run_coroutine_threadsafe(+ self.job_manager.shutdown(cancel_running=True),+ self._loop+ )+ try:+ future.result(timeout=2.0)+ except Exception:+ pass++ self._loop.call_soon_threadsafe(self._loop.stop)+ self._loop_thread.join(timeout=2.0)diff --git a/packages/mcp-server-revit/tests/test_approval_gate.py b/packages/mcp-server-revit/tests/test_approval_gate.pynew file mode 100644index 0000000..2895a6b--- /dev/null+++ b/packages/mcp-server-revit/tests/test_approval_gate.py@@ -0,0 +1,65 @@+import pytest+from pathlib import Path+from revit_mcp_server.config import Config, BridgeMode+from revit_mcp_server.security.approval import ApprovalGate+from revit_mcp_server.errors import BridgeError++def test_approval_gate_lifecycle(tmp_path):+ # 1. Setup ApprovalGate in required mode+ gate = ApprovalGate(workspace_dir=tmp_path, approval_mode="required")++ # 2. Assert mutating tool without plan is rejected+ with pytest.raises(BridgeError) as exc_info:+ gate.check_tool_execution("revit_create_wall", {})+ assert "requires a valid 'plan_id' parameter" in str(exc_info.value)++ # 3. Create plan+ actions = [+ {+ "tool": "revit_set_parameter_value",+ "arguments": {+ "element_id": 123,+ "parameter_name": "FireRating",+ "value": "60"+ }+ }+ ]+ before_states = [{ "123": { "FireRating": "30" } }]+ plan = gate.create_plan(actions, before_states)+ plan_id = plan["plan_id"]+ assert plan["state"] == "pending"+ assert len(plan["actions"]) == 1++ # 4. Assert execution is blocked when plan is pending+ with pytest.raises(BridgeError) as exc_info:+ gate.check_tool_execution("revit_set_parameter_value", { "plan_id": plan_id })+ assert "is in state 'pending', not 'approved'" in str(exc_info.value)++ # 5. Approve plan+ gate.update_plan_state(plan_id, "approved")++ # 6. Assert check passes when plan is approved+ gate.check_tool_execution("revit_set_parameter_value", { "plan_id": plan_id })++ # 7. Execute rollback+ # Mock execution function+ executed_calls = []+ def mock_execute(tool_name, arguments):+ executed_calls.append((tool_name, arguments))+ return { "status": "success" }++ # Transition state to executed first+ gate.update_plan_state(plan_id, "executed")++ # Execute rollback+ gate.rollback_plan(plan_id, mock_execute)++ # Verify rollback inverse call+ assert len(executed_calls) == 1+ assert executed_calls[0][0] == "revit_set_parameter_value"+ assert executed_calls[0][1]["value"] == "30"+ assert executed_calls[0][1]["element_id"] == 123++ # Verify state transitioned to rolled_back+ updated_plan = gate.load_plan(plan_id)+ assert updated_plan["state"] == "rolled_back"diff --git a/packages/mcp-server-revit/tests/test_perf.py b/packages/mcp-server-revit/tests/test_perf.pyindex 86da2cb..d8c6c6e 100644--- a/packages/mcp-server-revit/tests/test_perf.py+++ b/packages/mcp-server-revit/tests/test_perf.py@@ -1,7 +1,7 @@import timeimport pytest-from revit_mcp_server.server import MCPServerfrom revit_mcp_server.config import Config, BridgeMode+from helpers import MCPServer@pytest.mark.perfdef test_dispatch_overhead(tmp_path):diff --git a/packages/mcp-server-revit/tests/test_server.py b/packages/mcp-server-revit/tests/test_server.pyindex 384a1ce..8ef86f7 100644--- a/packages/mcp-server-revit/tests/test_server.py+++ b/packages/mcp-server-revit/tests/test_server.py@@ -1,7 +1,7 @@from pathlib import Pathfrom revit_mcp_server.config import BridgeMode, Config-from revit_mcp_server.server import MCPServer+from helpers import MCPServerclass DummyBridge:diff --git a/packages/mcp-server-revit/tests/test_tools.py b/packages/mcp-server-revit/tests/test_tools.pyindex 73a44e4..caa6343 100644--- a/packages/mcp-server-revit/tests/test_tools.py+++ b/packages/mcp-server-revit/tests/test_tools.py@@ -1,19 +1,23 @@+import pytestfrom pathlib import Path-from revit_mcp_server.security.workspace import WorkspaceMonitor-from revit_mcp_server.tools import TOOL_HANDLERS---def test_all_handlers_registered():- assert "revit.health" in TOOL_HANDLERS- assert "revit.export_report" in TOOL_HANDLERS- assert len(TOOL_HANDLERS) >= 25+from revit_mcp_server.providers.revit import RevitProvider+def test_all_handlers_registered(tmp_path):+ workspace = WorkspaceMonitor([tmp_path])+ provider = RevitProvider(workspace=workspace)+ tools = [t.name for t in provider.get_capabilities()]+ assert "revit_health" in tools+ assert "revit_create_wall" in tools+ assert len(tools) >= 25-def test_export_quantities_uses_workspace(tmp_path):+async def test_export_quantities_uses_workspace(tmp_path):workspace = WorkspaceMonitor([tmp_path])- handler = TOOL_HANDLERS["revit.export_quantities"]- payload = {"request_id": "test", "output_path": str(tmp_path / "quantities.json")}- response = handler(payload, workspace)- assert response["categories_exported"] == 5- assert str(tmp_path) in response["output_path"]+ provider = RevitProvider(workspace=workspace)+ payload = {"output_path": str(tmp_path / "quantities.json")}++ # Assert path is validated+ with pytest.raises(Exception):+ # Path outside workspace must raise ValueError or PermissionError+ await provider.execute_tool("revit_get_element_geometry", {"element_id": 1, "path": "C:/outside.rvt"})