Skip to main content
Glama

remove_widget

Destructive

Detach a runtime UserWidget from its viewport or panel by object name, without deleting it or editing its Widget Blueprint asset.

Instructions

Detach a runtime UserWidget, found by object name, from the viewport or panel holding it with RemoveFromParent. It searches the worlds create_widget uses: the one target_world names, or without it the running PIE world first and then the editor world; in each, the first widget hosted by a level UWidgetComponent, then any other UserWidget of that world. The object is not deleted, no asset changes and there is no undo. was_in_viewport and had_parent are measured before the call: both false means nothing was detached, as for a component-hosted widget. It never edits a Widget Blueprint asset.

Returns: { widget_name: string, target_world: string, was_in_viewport: bool, had_parent: bool, world_name: string|null, world_package: string|null, world_type: string|null, net_mode: string|null, pie_instance: number }

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
widget_nameYesObject name of the runtime widget to detach (case-insensitive), as list_level_widget_components or create_widget report it
target_worldNoOptional world to search, with the values create_widget takes (editor, pie, server, client, pie:N, game). Omitted: the PIE world while PIE runs, then the editor world.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv1.2.2
    • addedInput schema / properties / target_world
      Added value: +{
      +  "description": "Optional world to search, with the values create_widget takes (editor, pie, server, client, pie:N, game). Omitted: the PIE world while PIE runs, then the editor world.",
      +  "type": "string"
      +}
  2. Changed1 schema field changedv1.2.0
    • changedInput schema / properties / widget_name / description
      Previous value: -"Name of the widget to remove"New value: +"Object name of the runtime widget to detach (case-insensitive), as list_level_widget_components or create_widget report it"
  3. First observedv1.1.0

TDQS

A4.6/5.0
Behavior5/5

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

Annotations only flag destructiveHint=true / readOnlyHint=false, but the description goes well beyond: the object is not deleted, no asset changes, no undo, and the was_in_viewport/had_parent pre-measurement semantics including the 'both false means nothing detached' edge case for component-hosted widgets. This resolves the apparent tension between 'destructive' and 'detach-only', which is exactly the value the description should add.

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 core action is front-loaded in the first clause, and every sentence carries distinct, non-redundant information (world search order, no-undo, return semantics). It is dense and slightly long as a single block, but there is little that could be cut without losing meaning.

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

Completeness5/5

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

With no output schema present, the description carries the full return contract (widget_name, was_in_viewport, had_parent, world_* fields) and the side-effect profile. For a two-parameter runtime-affecting tool, everything needed to call and interpret it correctly is present.

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 coverage is 100%, so the schema documents both parameters and the baseline is 3. The description nonetheless adds meaning beyond the schema by describing the resolution order for widget_name (level UWidgetComponent host first, then any other UserWidget) and the world-selection fallback for target_world, which the schema does not convey.

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?

States a specific verb+resource ('Detach a runtime UserWidget... from the viewport or panel') and names the underlying operation (RemoveFromParent). It clearly distinguishes itself from siblings by referencing create_widget and list_level_widget_components, so an agent can place it without opening schemas.

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

Usage Guidelines4/5

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

Explains which world it searches (same worlds create_widget uses, PIE first then editor), the widget resolution order, and that it never touches a Widget Blueprint asset, giving the agent clear context for when this applies. It stops short of an explicit when-not-to-use or a named alternative tool for the inverse (e.g. add_widget_to_blueprint), so not a full 5.

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