add_widget_to_viewport
Instantiate a Widget Blueprint and add it to the game viewport. Use the Z-order parameter to control the rendering order.
Instructions
Instantiate a Widget Blueprint and add it to the game viewport.
Args: widget_name: Widget Blueprint name z_order: Rendering order (higher = on top)
KB: see knowledge_base/06_UI_UMG_SYSTEMS.md#overview Example: add_widget_to_viewport(widget_name="/Game/MCP_Test/WBP_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": {
"widget_name": "<widget_name>"
},
"name": "add_widget_to_viewport"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| z_order | No | ||
| widget_name | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |