Skip to main content
Glama
okenjioxx

Roblox Executor MCP Server

by okenjioxx

List GUI elements under a root

list-gui-elements
Read-onlyIdempotent

Enumerate the live GUI tree under a root Instance to discover on-screen UI elements, their paths, classes, and text for targeted interaction.

Instructions

Enumerate the live GUI tree under a root Instance (defaults to the LocalPlayer's PlayerGui) and return a flat list of every GuiObject it contains. This is the fastest way to discover what UI is actually on screen — the exact paths, classes and current Text — so you can then read or drive a specific element with get-gui-text, set-gui-text, click-button or type-text-box. Walks root:GetDescendants() with each property access pcall-guarded so a single hostile element never aborts the scan. For every descendant that is (or, with classFilter, exactly matches) a GuiObject it records { path = GetFullName(), class = ClassName, name = Name, Visible, Text } where Visible and Text are only present when readable. Output is capped at limit; when more elements exist than the cap, truncated is true. Returns { count, truncated, elements } or { error }. Signature: { root: any?, classFilter: string?, limit: any?, threadContext: number? }. Phase: observe; cost=medium; idempotency=read-only. Requires: active-client. Produces: bounded-candidates. Safety: read-only. On failure: inspect tool-schema for exact fields, defaults, constraints, and an invocation example.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
rootNoLuau expression resolving to the Instance whose descendant GUI tree to list. Defaults to 'game:GetService("Players").LocalPlayer.PlayerGui'. Pass a deeper expression such as 'game:GetService("CoreGui")' or 'game.Players.LocalPlayer.PlayerGui.MainMenu' to scope the walk. Evaluated as `return <root>`.game:GetService("Players").LocalPlayer.PlayerGui
limitNoMaximum number of elements to return (default 200). The walk stops adding once this many matches are collected and sets `truncated` to true so you know to scope the root or filter more tightly.
classFilterNoOptional exact ClassName to keep, e.g. 'TextButton', 'TextLabel', 'TextBox', 'ImageButton', 'Frame'. When set, only descendants whose ClassName equals this string are returned. When omitted, every GuiObject (IsA('GuiObject')) is returned. Case-sensitive.
threadContextNoOptional Roblox thread identity for this call; omit it to use the server default.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv2.0.0-spies.2

TDQS

A4.4/5.0
Behavior5/5

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

Annotations already establish read-only/idempotent/non-destructive, and the description adds substantial behavioral context beyond them: pcall-guarded property access so one hostile element cannot abort the scan, conditional presence of Visible/Text fields, the limit cap with a truncated flag, and the { count, truncated, elements } or { error } return contract.

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-loads the purpose and workflow before metadata, and most sentences earn their place. However the 'Signature: { root, classFilter, limit, threadContext }' line duplicates the input schema verbatim, and the trailing failure boilerplate adds little, so there is minor waste.

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?

Despite no output schema, the description fully specifies the return shape (count/truncated/elements or error), the default root, and truncation semantics. For a 4-parameter, zero-required observation tool, an agent has everything needed to invoke and interpret it correctly.

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 root, limit, classFilter and threadContext are already fully documented in the schema. The description mostly restates this via the 'Signature' line and reiterates classFilter exact-matching and the limit/truncated behavior, adding little beyond the structured fields. Baseline 3 applies when the schema does the heavy lifting.

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 (enumerate), resource (live GUI tree under a root Instance), and output shape (flat list of every GuiObject). It also distinguishes itself from siblings by naming the downstream tools it feeds (get-gui-text, set-gui-text, click-button, type-text-box), so an agent can place it in the workflow 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?

Explicitly frames the tool as 'the fastest way to discover what UI is actually on screen' and routes the agent to the correct follow-up tools for reading or driving a specific element. Strong positive guidance, but it never states when a sibling (e.g. find-hidden-guis, get-hidden-ui, list-rendered-instances) should be preferred instead, so no explicit exclusions.

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