Skip to main content
Glama
okenjioxx

Roblox Executor MCP Server

by okenjioxx

Run a Luau snippet repeatedly with a delay, collecting results

run-loop
Destructive

Execute a Luau snippet repeatedly with configurable delays in one round trip, capturing each iteration's return to poll changing values or retry flaky operations.

Instructions

Run a Luau snippet iterations times in a single round trip, waiting delayMs between iterations, and collect what each run produced. Use this to poll a value over time (e.g. read a Humanoid's Health every 200ms for 20 iterations to watch it change), to retry a flaky operation, or to drive a short repeated action and see the outcome of each pass — all without paying a tool round trip per iteration. The code is COMPILED ONCE (a syntax error returns { error } and nothing runs); each iteration is executed inside its own pcall so a runtime error in one pass is recorded and the loop continues. When collectReturns is true the FIRST return value of each run is captured via __encVal (Instances become their full path, tables/functions become a stable string), giving an ordered series you can compare across iterations. The whole loop runs synchronously in-client, so total time is roughly iterations * delayMs — keep that under the tool timeout. Requires loadstring; uses task.wait for the delay (falls back to wait). Returns { iterations, results, errorCount, errors } or { error }. Signature: { code: string, iterations: any?, delayMs: any?, collectReturns: any?, threadContext: number? }. Phase: act; cost=high; idempotency=contextual-write. Requires: active-client, explicit-mutation-approval, validated-source. Produces: operation-receipt. Verify with: assert-state. Safety: MUTATING; executes caller-selected behavior in the live client. On failure: inspect tool-schema for exact fields, defaults, constraints, and an invocation example.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
codeYesThe Luau snippet to run each iteration. Compiled once, then executed every pass. To capture a value per iteration, `return` it (only the first return value is collected when collectReturns is true).
delayMsNoMilliseconds to wait between iterations via task.wait (default 0 = yield minimally each pass). Use e.g. 200 to sample a value five times a second. There is no wait after the final iteration.
iterationsNoHow many times to run the snippet (default 5, clamped 1..1000). Combined with delayMs this determines total wall-clock time, so keep iterations * delayMs comfortably under the request timeout.
threadContextNoOptional Roblox thread identity for this call; omit it to use the server default.
collectReturnsNoWhen true (default), capture the FIRST return value of each iteration into `results` (encoded as a serializable scalar/string). Set false to skip capture when the snippet returns nothing useful or large values you do not want echoed back.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv2.0.0-spies.2

TDQS

A4.6/5.0
Behavior5/5

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

Goes well beyond the annotations: compile-once semantics, syntax errors returning {error} with nothing run, per-iteration pcall isolation so runtime errors are recorded but the loop continues, the __encVal encoding of returned values, synchronous in-client execution with total time ≈ iterations * delayMs, and the loadstring requirement. The mutating/live-client nature is stated explicitly.

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?

Core purpose is front-loaded in sentence one, and most sentences carry distinct information (compile behavior, error isolation, timing budget, return shape). It is dense and long, and the trailing Phase/cost/idempotency/Requires metadata block is boilerplate that could be trimmed.

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?

For a high-complexity mutating tool with no output schema, the description covers return shape ({iterations, results, errorCount, errors} or {error}), failure modes, timing constraints, and prerequisites. An agent has everything needed to call it correctly.

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 coverage is 100%, so the baseline is 3, but the description adds real value: the collectReturns encoding behavior (Instances become full paths, tables/functions become stable strings) and the first-return-value-only capture rule go beyond the schema's 'serializable scalar/string' phrasing. The signature line is somewhat redundant with the schema.

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+resource (run a Luau snippet N times with a delay, collecting each run's output) and the loop semantics immediately separate it from single-shot siblings like run-luau or execute. The title and first sentence align exactly with what the 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 Guidelines4/5

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

Gives three concrete usage scenarios (polling a value over time, retrying a flaky operation, driving a short repeated action) and explains the benefit over per-iteration round trips. It stops short of naming alternatives (e.g., watch-value for monitoring, run-with-timeout for bounded execution) or stating when NOT to use it.

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