Execute a Luau file on the active client
execute-fileRun a Luau script file from allow-listed server paths on the active Roblox client, returning its first decoded result.
Instructions
Read a Luau script from the SERVER host filesystem and execute its contents on the active Roblox client, returning the first value the script returns (decoded automatically — return what you want back). The path is read through an allow-list sandbox: only files inside the configured roots (the server's working directory, ~/Documents, and any extra script directories set in the config) can be read, and symlinks that escape those roots are rejected. A path outside the allow-list, or a missing file, returns an error without running anything. Use run-luau when you already have the source inline. Signature: { path: string, threadContext: number?, timeoutMs: number? }. Phase: act; cost=medium; idempotency=contextual-write. Requires: active-client, resolved-target, explicit-mutation-approval. Produces: operation-receipt. Verify with: assert-state. Safety: MUTATING; writes executor workspace filesystem. On failure: inspect tool-schema for exact fields, defaults, constraints, and an invocation example.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | Absolute or relative path to a .lua/.luau file inside an allow-listed root. | |
| timeoutMs | No | Per-call deadline in milliseconds. Server default if omitted. | |
| threadContext | No | Roblox thread identity to run under (e.g. 2 = game scripts, 8 = elevated). Server default if omitted. |