Read the text of a GUI element
get-gui-textRead the displayed, rendered, or placeholder text from a Roblox GUI element by resolving a Luau path, so you can inspect label contents or TextBox input before acting.
Instructions
Resolve a Luau expression to a single GUI Instance and return whichever text properties it actually exposes: .Text (the editable/displayed string on TextLabels, TextButtons and TextBoxes), .ContentText (the rendered text after rich-text/markup processing) and .PlaceholderText (the grey hint shown by an empty TextBox). Use this to inspect exactly what a label says or what a player has typed before acting on it. Each property read is independently pcall-guarded, so missing properties are simply omitted rather than erroring — a Frame with no text fields returns just { Path }. Pair with list-gui-elements to first discover the path. Returns { Path, Text?, ContentText?, PlaceholderText? } or { error }. Signature: { path: string, threadContext: number? }. Phase: observe; cost=medium; idempotency=read-only. Requires: active-client, resolved-target. Produces: structured-observation. Safety: read-only. On failure: inspect tool-schema for exact fields, defaults, constraints, and an invocation example.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | Luau expression resolving to the GUI Instance to read, e.g. 'game.Players.LocalPlayer.PlayerGui.Shop.PriceLabel' or 'game:GetService("Players").LocalPlayer.PlayerGui.Login.UsernameBox'. Evaluated as `return <path>`. | |
| threadContext | No | Optional Roblox thread identity for this call; omit it to use the server default. |