Skip to main content
Glama

widget_add_child

Add a child widget to a Widget Blueprint tree with support for UMG classes like CanvasPanel or TextBlock, and optional parent attachment for UI layout.

Instructions

Add a child widget to a Widget Blueprint tree.

Args: widget_blueprint_path: Full Widget Blueprint asset path, e.g. /Game/UI/WBP_HUD or /Game/UI/WBP_HUD.WBP_HUD. child_class: Supported UMG class name such as CanvasPanel, TextBlock, Image, ProgressBar, Button, HorizontalBox, VerticalBox, Overlay, or SizeBox. child_name: Name for the new child widget. parent_name: Optional panel widget to attach under. If omitted, the child becomes the root when no root exists, or attaches to the root when the root is a panel.

KB: see knowledge_base/06_UI_UMG_SYSTEMS.md#overview Example: widget_add_child(widget_blueprint_path="/Game/MCP_Test/BP_Example", child_class="Actor", child_name="ExampleName")

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
child_nameYes
child_classYes
parent_nameNo
widget_blueprint_pathYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

B3.3/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries the behavioral burden. It does disclose the meaningful root-attachment fallback behavior for parent_name and lists supported child classes, but it does not mention side effects, failure modes, or whether existing roots are replaced or rejected.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is front-loaded with the core purpose and then organized into Args, KB link, and Example. It is slightly longer than strictly necessary, but each section earns its place; the example mostly duplicates existing parameter explanations.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The description covers the main parameters and the optional-parent fallback rule, and an output schema exists so return values need not be described. However, it leaves important edge cases implicit, such as what happens when a root exists and is not a panel, or whether the child_name must be unique.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description must compensate. It explains every parameter, gives a path format example, lists allowed child class names, and clarifies parent_name semantics. The example using child_class='Actor' is potentially misleading because 'Actor' is not in the supported UMG class list.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states a specific operation ('Add a child widget to a Widget Blueprint tree') and names the primary resource. It does not explicitly differentiate itself from the many sibling tools like add_text_block_to_widget or add_button_to_widget, though its generic child_class parameter implies a broader role.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

There is no explicit guidance about when to prefer this generic tool over the dedicated widget-specific siblings, nor any 'when not to use' note. The parent_name behavior is explained, but tool-selection context is missing.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Deploy Server

Other Tools