Skip to main content
Glama
okenjioxx

Roblox Executor MCP Server

by okenjioxx

Set the .Text of a GUI element

set-gui-text
Destructive

Set a Roblox TextLabel, TextButton, or TextBox .Text directly from a Luau expression, returning old and new text for auditing.

Instructions

WRITES LIVE GAME STATE. Resolve a Luau expression to a GUI Instance and overwrite its .Text property, returning both the OLD and NEW text so the change is auditable. Use this to directly poke a value into a TextLabel, TextButton or TextBox without simulating keystrokes — e.g. to pre-fill a login/search box or change a label while debugging UI logic. This sets the raw .Text directly and does NOT fire FocusLost / text-changed input events, so scripts that react only to player typing may not run; use type-text-box with useKeyPress when you need real keystroke side-effects. The read of the old text and the write are each pcall-guarded. WARNING: this mutates the running client UI immediately. Returns { Path, OldText, NewText, ok } or { error }. Signature: { path: string, text: string, threadContext: number? }. Phase: act; cost=medium; idempotency=idempotent-write. Requires: active-client, resolved-target, explicit-mutation-approval. Produces: operation-receipt. Verify with: get-gui-text. Safety: MUTATING; writes live game/client state. On failure: inspect tool-schema for exact fields, defaults, constraints, and an invocation example.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYesLuau expression resolving to the GUI Instance whose .Text to set, e.g. 'game.Players.LocalPlayer.PlayerGui.Login.UsernameBox'. Evaluated as `return <path>`. The resolved Instance must have a writable .Text property (TextLabel / TextButton / TextBox).
textYesThe new string to assign to the element's .Text property. Written verbatim.
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
Behavior4/5

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

Goes well beyond the annotations: discloses that FocusLost/text-changed events do NOT fire, that reads/writes are pcall-guarded, and returns { Path, OldText, NewText, ok } for auditability. Safety traits (mutating, destructive, non-readOnly) agree with the annotations. Minor tension: the metadata line says 'idempotency=idempotent-write' while the annotation sets idempotentHint=false, though the practical effect (setting a fixed string) is harmless to retry.

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 critical warning 'WRITES LIVE GAME STATE' and organized into purpose, caveats, return shape, and metadata. Slightly long due to the boilerplate trailing 'On failure: inspect tool-schema...' line, but nearly every sentence earns its place.

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 ({ Path, OldText, NewText, ok } or { error }), the mutation warning, prerequisites (active-client, explicit-mutation-approval), and verification (get-gui-text). Nothing an agent needs to invoke it safely 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 description coverage is 100%, so path/text/threadContext are already fully documented in the schema, including the Luau expression form and 'written verbatim'. The description's 'Signature:' line only restates the schema, adding no new parameter meaning, so 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 precise verb+resource: 'Resolve a Luau expression to a GUI Instance and overwrite its .Text property.' It is clearly distinguishable from siblings get-gui-text (read), type-text-box/click-button (input simulation), and set-instance-property (generic property write).

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicit when-to-use ('pre-fill a login/search box or change a label while debugging UI logic') and when-not, naming the alternative: 'use type-text-box with useKeyPress when you need real keystroke side-effects.' This gives an agent a clean routing rule.

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