Skip to main content
Glama

execute_luau

Execute custom Luau scripts in Roblox Studio's Edit mode to modify DataModel, properties, and instances. The code can return values encoded as JSON.

Instructions

Run arbitrary Luau code in Roblox Studio (plugin security level, Edit-only). During Play use manage_studio.run_test / play agents instead — plugin loadstring is unavailable in Play. The code may return a value, which is JSON-encoded (Instances become path strings, Roblox types become typed tables). A helper table RB is available with RB.resolve(path or rbId), RB.encode(value), RB.summary(instance) (includes rbId), RB.setProp(instance, name, value), RB.stripIds().

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
codeYesLuau source to run
timeoutSecondsNoMax wait (default 30)
Behavior5/5

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

With no annotations, the description carries the full burden and delivers: it discloses security level, Edit-only constraint, return-value JSON encoding behavior (Instances become path strings, Roblox types become typed tables), and the RB helper table with its methods. This is rich behavioral context beyond any structured metadata.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Every sentence earns its place: purpose, usage guidance, return semantics, and helper table. It is front-loaded with the primary action, and the length is appropriate for the complexity of the tool. No fluff or repetition of schema details.

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?

Given the tool's power (arbitrary code execution), the description covers all critical aspects: environment, security, Play vs Edit, return value handling, and available helper APIs. It even provides enough context for an agent to understand side-effect potential and encoding without needing an output schema. This is a model description for a code execution tool.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Although the schema covers both parameters at 100%, the description adds substantial meaning: the `code` parameter is elaborated with return-value behavior and RB helper context, which directly informs how to write the Luau code. Timeout is already adequately described in the schema, but the description's added context for `code` goes well beyond the basic schema description.

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?

The description opens with 'Run arbitrary Luau code in Roblox Studio' — a clear specific verb+resource pair. It also distinguishes from siblings by noting 'plugin security level, Edit-only' and explicitly contrasting with Play-time alternatives, leaving no ambiguity about what this tool does.

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?

Explicitly states when NOT to use this tool: 'During Play use manage_studio.run_test / play agents instead — plugin loadstring is unavailable in Play.' This provides a clear usage boundary and names the alternative tools, making the decision framework unambiguous.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Allusia1/RoBridge'

If you have feedback or need assistance with the MCP directory API, please join our Discord server