add_create_widget_node
Adds a CreateWidget node to a Blueprint graph to instantiate a Widget Blueprint at runtime and store its reference for later use.
Instructions
Add a CreateWidget node to instantiate a Widget Blueprint at runtime.
From Ch. 7 (Displaying HUD), Ch. 8 (Win menu), Ch. 11 (Lose/Pause menus): Creates a widget instance and optionally adds it to the viewport.
Args: blueprint_name: Blueprint to add the node to widget_class: Widget Blueprint class to instantiate owning_player_variable: PlayerController variable (empty = Get Player Controller) store_in_variable: Variable to store the widget reference (for later use) node_position: [X, Y] graph position
KB: see knowledge_base/06_UI_UMG_SYSTEMS.md#overview Example: add_create_widget_node(blueprint_name="/Game/MCP_Test/BP_Example")
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": {
"blueprint_name": "<blueprint_name>"
},
"name": "add_create_widget_node"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| widget_class | No | ||
| node_position | No | ||
| blueprint_name | Yes | ||
| store_in_variable | No | ||
| owning_player_variable | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |