MCP Tools (AI Agents)
The CrimsonUIToolset (module CrimsonUIEditor) lets an AI agent inspect and drive the CommonUI layer stack of a running PIE session over MCP. It registers only when Crimson MCP is enabled (Project Settings -> Crimson -> Crimson MCP; requires an editor restart - see CrimsonEditorUtilities -> Quick Start). All tools operate on the primary local player's root layout (UCrimsonPrimaryGameLayout) in the first PIE world that owns a local player - never the dedicated-server world, which shows no UI. The act tools push/pop widgets on the local UI only; errors surface to the agent as a script error.
| Tool | Kind | Description |
|---|---|---|
GetUIState | read | Configured policy / dialog classes (from UCrimsonUISettings), the runtime UI policy class, local-multiplayer interaction mode, the primary player's root layout class + dormant flag, and registered-layer / widget counts. |
ListLayers | read | Every UI.Layer.* layer on the root layout with its widget count and active (top) widget class, or not registered when the layout has no container for that tag. |
GetLayerDetail | read | One layer's full widget stack, top-first, marking the active widget. Param: a UI.Layer.* tag (e.g. UI.Layer.GameMenu). |
PushWidgetToLayer | act | Create and push a UCommonActivatableWidget subclass onto a layer stack. Params: a registered UI.Layer.* tag and the widget's full class path (a _C suffix is appended for Blueprints). |
PopWidgetFromLayer | act | Remove the active (top) widget from a layer stack. Param: a registered UI.Layer.* tag. |