Skip to main content
Glama

reorder_widget_child

Destructive

Reorder a widget within its parent panel by changing its child index; the new index is clamped to valid bounds, and CanvasPanel stacking may require ZOrder instead.

Instructions

Change a widget's index among its parent panel's children via UPanelWidget::ShiftChild (clamps new_index internally; safe with any int). For a CanvasPanel parent, visual stacking is governed by each child's CanvasPanelSlot ZOrder (set_widget_slot_properties z_order), NOT child index -- the index shift is still applied and reported honestly, with a note.

Returns: { widget_bp_path: string, widget_name: string, parent_name: string, old_index: int, requested_index: int, resolved_index: int, child_count: int, reordered: bool, parent_is_canvas_panel: bool, note?: string, saved: bool, save_error: string }

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
forceNoOptional. This command is REFUSED while a Play-in-Editor session is running: it either compiles a Blueprint (the reinstancer can retain a world, and CheckForWorldGCLeaks is Fatal -- it KILLS the editor) or writes to disk (Editor.AllowSavingAssetsDuringPIE=0 makes the engine refuse the write, so it would report success without writing a byte). Stop PIE and retry instead; force=true runs it anyway, at your own risk.
new_indexYesdesired index among its parent's children (clamped to [0, child_count])
widget_nameYesname of the widget to reorder
blueprint_nameNoAlias of `widget_bp_path` (same value, same meaning). Accepted because sibling tools spell this parameter differently; prefer `widget_bp_path`.
widget_bp_pathNo/Game path of the Widget Blueprint asset

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.1.0

TDQS

A4.2/5.0
Behavior4/5

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

Annotations already declare destructiveHint=true and non-idempotent. The description adds real behavioral context beyond them: internal clamping, the honest-but-possibly-cosmetically-inert result on CanvasPanel parents, and the returned note flag. The PIE refusal/WYSIWYG caveat is carried in the schema rather than the description.

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?

Front-loaded with the core action and mechanism, then the important caveat, then a structured Returns block. Slightly dense but every clause carries useful information.

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?

No output schema exists, and the description supplies the full return shape, the clamping behavior, and the CanvasPanel ZOrder caveat, so an agent has everything needed to call and interpret the result.

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

Parameters3/5

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

Schema description coverage is 100%, so the schema already documents all five parameters, including the detailed force/PIE explanation and the new_index clamp range. The description adds only marginal framing (safe with any int), so it sits at the baseline.

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 (reorder/change index) and resource (a widget's index among its parent panel's children), plus the underlying mechanism (UPanelWidget::ShiftChild). It is clearly distinguishable from siblings like reparent_widget or set_widget_slot_properties.

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?

Explicitly warns that for a CanvasPanel parent visual stacking is governed by CanvasPanelSlot ZOrder, and routes the agent to set_widget_slot_properties z_order for that purpose. This is strong alternative-routing, though it does not frame a general 'when to use this vs. alternatives' statement.

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