Skip to main content
Glama
swlittles
by swlittles

run_luau

Execute Luau code in Roblox Studio's DataModel and retrieve print/warn output plus return values. Target edit, server, client, or player sessions for flexible testing.

Instructions

Execute Luau in a Studio DataModel and return print/warn output plus returned values. Code may yield (task.wait). plugin is available in scope. Target: edit (default), server, client, client:<PlayerName|n>, or a session id.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
codeYes
targetNo
timeoutSecNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.4/5.0
Behavior4/5

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

The description discloses key behavioral traits: code may yield (task.wait), `plugin` is available in scope, and the tool returns print/warn output plus returned values. It also reveals that the target can be a session id, which implies stateful execution. With no annotations provided, the description carries the full burden, and it does a good job of setting expectations about execution context and output. It doesn't mention side effects or persistence, but for a code execution tool, the disclosed traits are substantial.

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?

The description is compact and front-loaded: it states the action, the environment, the output, and the key execution caveat in the first sentence. The second sentence lists targets efficiently. Every sentence earns its place, and there is no filler or repetition of schema fields.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a code execution tool with no output schema and no annotations, the description covers the essential context: what it runs, where it runs, what it returns, and the available targets. It could mention timeout behavior or error handling, but the `timeoutSec` parameter name implies a timeout. The sibling tools are all distinct enough that an agent can select this tool correctly. A 4 is appropriate because it's nearly complete but leaves minor gaps around failure modes and exact return format.

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

Parameters4/5

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

Schema description coverage is 0%, so the description must compensate. It explains the `code` parameter implicitly (the code to execute) and the `target` parameter explicitly by listing valid values (edit, server, client, client:<PlayerName|n>, session id). It does not explain `timeoutSec`, but the name is self-explanatory. The description adds meaning beyond the bare schema, especially for `target`, which would otherwise be ambiguous.

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 clearly states the tool executes Luau code in a Studio DataModel and returns print/warn output plus returned values. It also specifies the available execution targets (edit, server, client, client:<PlayerName|n>, session id), which distinguishes it from sibling tools like get_logs or screenshot. The verb 'Execute' plus the resource 'Luau in a Studio DataModel' makes the purpose unambiguous.

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?

The description provides clear context on when to use this tool: when you need to run Luau code and capture output. It lists the target options, which helps the agent choose the right execution context. However, it doesn't explicitly state when NOT to use it or name alternative tools (e.g., use get_logs for reading logs, use start_test for running tests). The target list partially compensates by implying the tool is for arbitrary code execution rather than specific test or log operations.

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