Skip to main content
Glama

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")

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
z_orderNo
widget_nameYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A3.7/5.0
Behavior2/5

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

No annotations are provided, so the description carries the full behavioral burden. It discloses the core action and z-order behavior, but omits side effects such as duplicate widget instances on repeated calls, whether a running PIE session is required, instance lifetime/cleanup, or error behavior on invalid widget names.

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

Conciseness5/5

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

The description is compact and well-structured with summary, args, KB pointer, and example. Every section earns its place, and the core action is front-loaded.

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?

For a two-parameter runtime UI action, the description provides parameter notes, a KB reference, and a concrete example, which covers basic invocation. However, without annotations it lacks prerequisite, lifecycle, and failure-mode information; the output schema exists but is not described here, so the agent must rely on external schema for return semantics.

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%, and the description compensates by defining both parameters: 'Widget Blueprint name' for widget_name and 'Rendering order (higher = on top)' for z_order. The example also clarifies the expected asset-path form. It adds meaning beyond the bare schema titles, though widget_name could be more explicit about path vs. simple name.

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

Purpose5/5

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

The description uses a specific verb-resource pairing — 'Instantiate a Widget Blueprint and add it to the game viewport' — which precisely distinguishes this runtime display operation from sibling tools that create, edit, or bind widgets. The example and KB reference reinforce this without ambiguity.

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

Usage Guidelines3/5

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

The description implies the use case: at runtime, instantiate a widget and show it in the viewport. It does not explicitly state when not to use it or name alternatives such as create_umg_widget_blueprint or widget_add_child, so the agent must infer selection from the sibling list and context.

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