Skip to main content
Glama

pop_common_ui_widget

Destructive

Pops the active screen off a live CommonUI stack or clears the entire stack, enabling headless menu state machine navigation in Unreal Engine PIE sessions.

Instructions

Pop the ACTIVE screen off a live CommonUI stack, or clear the whole stack -- the inverse of push_common_ui_widget and the other half of driving a menu state machine headless (open, go deeper, come back, assert what is on top). WARNING: RUNTIME ONLY, same as the push: with no PIE session there is nothing on any stack. Popping an empty stack is an honest success with popped:false, not an error.

Returns: { stack_widget_name, popped: bool, popped_widget: string, cleared_all: bool, widget_count: int, active_widget: string } -- widget_count and active_widget are read AFTER the operation; popped:false with widget_count:0 means the stack was already empty.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
worldNoOptional world selector: absent/'pie' | 'server' | 'client' | 'pie:N'.
clear_allNoRemove EVERY widget instead of just the active one (default false).
player_indexNoOptional local player index whose viewport widgets are searched (default 0).
stack_widget_nameYesName of the live activatable container in the running session.

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 set destructiveHint=true and readOnlyHint=false, and the description adds substantial extra context: RUNTIME-ONLY (no PIE session means empty stacks), and that popping an empty stack is an honest success with popped:false rather than an error. That empty-stack semantics and PIE dependency are exactly the traits annotations don't convey.

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 operation is front-loaded in the first clause, and the runtime warning and return shape follow logically. There is some density from parenthetical asides ('the other half of driving a menu state machine headless'), slightly more than strictly necessary.

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 compensates by spelling out the full return shape (stack_widget_name, popped, popped_widget, cleared_all, widget_count, active_widget) plus the post-operation read timing and the empty-stack interpretation. Combined with the runtime caveat, nothing an agent needs to call it correctly is missing.

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 the schema already documents world, clear_all, player_index, and stack_widget_name. The description reinforces clear_all behavior in prose but adds no syntax or format detail beyond the schema. Baseline 3 is appropriate.

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 (pop/clear) and resource (CommonUI stack), distinguishes the two modes explicitly, and names its counterpart push_common_ui_widget as the inverse. An agent can differentiate it from siblings without opening the schema.

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?

Names the alternative (push_common_ui_widget) and frames the workflow scenario (open, go deeper, come back, assert). The runtime-only WARNING effectively communicates a when-not condition. No explicit guidance on clear_all vs single pop selection beyond the prose, 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