widget_set_anchor
Set CanvasPanelSlot anchor, position, size, and alignment for a UMG widget in Unreal Engine to control its UI layout precisely.
Instructions
Set CanvasPanelSlot anchor, position, size, and alignment.
KB: see knowledge_base/06_UI_UMG_SYSTEMS.md#overview Example: widget_set_anchor(widget_blueprint_path="/Game/MCP_Test/BP_Example", widget_name="/Game/MCP_Test/WBP_Example", anchor_min_x=0.0, anchor_min_y=0.0, anchor_max_x=0.0, anchor_max_y=0.0, position_x=0.0, position_y=0.0, size_x=0.0, size_y=0.0)
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_blueprint_path": "<widget_blueprint_path>",
"widget_name": "<widget_name>",
"anchor_min_x": "<anchor_min_x>",
"anchor_min_y": "<anchor_min_y>",
"anchor_max_x": "<anchor_max_x>",
"anchor_max_y": "<anchor_max_y>",
"position_x": "<position_x>",
"position_y": "<position_y>",
"size_x": "<size_x>",
"size_y": "<size_y>"
},
"name": "widget_set_anchor"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| size_x | Yes | ||
| size_y | Yes | ||
| position_x | Yes | ||
| position_y | Yes | ||
| alignment_x | No | ||
| alignment_y | No | ||
| widget_name | Yes | ||
| anchor_max_x | Yes | ||
| anchor_max_y | Yes | ||
| anchor_min_x | Yes | ||
| anchor_min_y | Yes | ||
| widget_blueprint_path | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |