Skip to main content
Glama
okenjioxx

Roblox Executor MCP Server

by okenjioxx

Schedule a Luau snippet to run in the background (fire-and-forget)

run-deferred
Destructive

Schedules a Luau snippet on its own thread and returns immediately without waiting, so you can run background tasks like watchers, auto-farms, pollers, or delayed code while issuing other calls.

Instructions

Schedule a Luau snippet to run on its OWN thread and return immediately WITHOUT waiting for it to finish. Use this to start something that runs in the background while you keep issuing other tool calls — e.g. kick off a long watcher loop, an auto-farm, a background poller, or any snippet you want to run later or off the current thread so it cannot block the round trip. The code is COMPILED FIRST via loadstring; a syntax error is returned cleanly as { error } and nothing is scheduled. On success the compiled function is handed to the chosen scheduler and the tool returns at once. Modes (Luau task library): - 'spawn' -> task.spawn(fn): start running on a fresh thread immediately. - 'defer' -> task.defer(fn): run on a fresh thread at the end of the current resumption cycle. - 'delay' -> task.delay(delaySec, fn): run on a fresh thread after delaySec seconds. IMPORTANT: because this does not wait, you will NOT see the snippet's return value, errors, or print output here — the scheduled thread runs independently and any error inside it is swallowed by task. If the snippet installs state or a loop, YOU are responsible for stopping it (e.g. have it watch a getgenv() flag). Requires loadstring and the task library (both guarded). Returns { scheduled = true, mode, delaySec? } or { error }. Signature: { code: string, mode: any?, delaySec: any?, threadContext: number? }. Phase: act; cost=medium; 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 in the background. Compiled with loadstring, then scheduled on its own thread. Since nothing is awaited, build in your own stop condition for long loops (e.g. `while getgenv().__myFlag do ... task.wait() end`) so you can shut it down later.
modeNoHow to schedule the thread: 'spawn' starts it immediately on a new thread; 'defer' runs it at the end of the current resumption cycle; 'delay' runs it after `delaySec` seconds. Default 'spawn'.spawn
delaySecNoSeconds to wait before the snippet runs. Only used when mode='delay' (ignored for spawn/defer). Default 0.
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
Behavior5/5

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

Adds substantial behavior beyond the annotations: compile-first via loadstring with syntax errors returned as {error} before anything is scheduled, errors/returns/prints being invisible because the thread runs independently, errors swallowed by task, and the caller's responsibility to build a stop condition. It also states prerequisites (loadstring, task library) and the return shape, none of which the schema or annotations convey.

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?

The core purpose is front-loaded and the mode list is scannable, but the fire-and-forget guarantee is restated several times and the trailing metadata footer (Phase/cost/Requires/Produces) adds boilerplate weight. Efficient enough, slightly verbose.

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 discloses the return value ({scheduled=true, mode, delaySec?} or {error}), the safety posture, prerequisites, and the lifecycle caveat about stopping my own loops. Nothing needed to invoke it correctly 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 the schema already documents code, mode, delaySec, and threadContext. The description's restatement of the spawn/defer/delay modes and delaySec behavior largely duplicates the schema, so it earns the baseline 3 with only marginal added meaning.

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 ('Schedule a Luau snippet to run') and its defining trait ('on its OWN thread and return immediately WITHOUT waiting'). This cleanly separates it from waiting/blocking siblings like execute-and-wait and batch-execute, so an agent can distinguish it without opening a schema.

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 concrete when-to-use guidance with examples ('kick off a long watcher loop, an auto-farm, a background poller') and frames it as the non-blocking counterpart to synchronous execution. It stops short of explicitly naming a sibling alternative for the blocking case, so the exclusion is implied rather than a named route.

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