Skip to main content
Glama

set_widget_navigation

DestructiveIdempotent

Author a widget's gamepad and keyboard focus rules so menus respond to D-pad, Tab and Shift+Tab, setting Wrap, Stop, Escape or Explicit targets per direction.

Instructions

Author a widget's GAMEPAD/KEYBOARD navigation rules -- what gets focus when the player pushes up, down, left, right, Tab or Shift+Tab off this widget. Without this a menu cannot be driven with a pad, and it is NOT reachable through set_widget_property: UWidget::Navigation is an Instanced SUBOBJECT that starts null, so there is no asset path a reflection setter could point at and a dotted path fails on a null segment. Follows the editor's own flow, including the two details that matter: the subobject is created RF_Transactional with template flags propagated, and if all six directions end up on Escape the subobject is DISCARDED (that is what tells "no navigation authored" apart from "navigation authored that happens to be the default", and it is what the Designer does). Read the result back with get_widget_blueprint_tree include_navigation=true.

Returns: { widget_bp_path, widget_name, applied: [{direction, rule, widget_to_focus}], current_navigation: {Up:{rule,widget_to_focus}, ...}, navigation_discarded: bool, saved, save_error } -- navigation_discarded:true means every direction ended on Escape so the subobject was dropped, exactly as the Designer does; current_navigation is then all-Escape.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
saveNoCompile + save the Widget Blueprint when done (default true).
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.
rulesNoDict of {direction: rule}. Direction is Up|Down|Left|Right|Next|Previous (Next/Previous are Tab/Shift+Tab). The value is either a rule name string ("Wrap", "Stop", "Escape") or an object {"rule":"Explicit","widget_to_focus":"Btn_Confirm"} when the rule needs a target. Rules: Escape (default -- let the search continue outward), Stop (movement dies here), Wrap (cycle inside the container), Explicit (jump to widget_to_focus).
widget_nameYesName of the widget in the tree whose navigation to author
all_directionsNoOptional rule name applied to ALL SIX directions before `rules` is processed, so you can say "Stop everywhere, except Down" in one call. Explicit is refused here: it would need six different targets.
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.4/5.0
Behavior5/5

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

Annotations already flag destructiveHint=true, but the description discloses the concrete behaviors: the subobject is created RF_Transactional with template flags propagated, and it is DISCARDED if all six directions end on Escape so 'no navigation authored' is distinguishable from the default. It also surfaces the PIE refusal hazard and full return shape.

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 purpose, then the non-obvious rationale for why it exists, then return values. Dense and information-rich, but the returns narration and the two-detail subobject explanation are verbose enough that some trimming is possible.

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, the description supplies the complete return shape and the navigation_discarded semantics. Combined with the PIE safety note and the read-back tool reference, an agent has everything needed to call it correctly for a 7-param destructive tool.

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 coverage is 100%, so every parameter's meaning is already documented in the schema, including the rules dict semantics, the all_directions ordering, and the blueprint_name alias rationale. The description largely restates what the schema carries, so the baseline 3 applies.

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 and resource ('author a widget's GAMEPAD/KEYBOARD navigation rules') and enumerates the scope (up/down/left/right/Tab/Shift+Tab focus). It explicitly distinguishes itself from the sibling set_widget_property by explaining navigations is an Instanced subobject that a reflection setter cannot reach.

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?

Gives clear context ('without this a menu cannot be driven with a pad'), rules out the tempting alternative (set_widget_property), and points to the read-back path via get_widget_blueprint_tree include_navigation=true. It lacks an explicit when-not condition besides the set_widget_property exclusion.

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