Compile a workspace Luau file without running it (UNC loadfile)
load-fileCompile a Luau file from the executor workspace without running it to verify that it parses and surface syntax errors. Returns compiled status and any error string.
Instructions
Compile a Luau file from the executor's workspace into a function WITHOUT executing it, to verify that it parses and to surface any syntax error. NOTE: this is executor-side file I/O — the connector runs INSIDE the executor, so the path is relative to the executor's workspace directory on the host machine, NOT the Roblox game. This tool intentionally does NOT call the compiled function; it only reports whether compilation succeeded. Requires the UNC function loadfile(path) -> (fn?, err?). The call is type-guarded and pcall-wrapped: if loadfile is missing you get { error = 'loadfile is not available in this executor.' }. On a compile error loadfile returns nil plus an error string, surfaced as { compiled = false, error }. Returns { path, compiled, error? } or { error }. Signature: { path: string, threadContext: number?, timeoutMs: number? }. Phase: observe; cost=medium; idempotency=read-only. Requires: active-client, resolved-target. Capabilities: readfile. Produces: structured-result. Safety: read-only. On failure: inspect tool-schema for exact fields, defaults, constraints, and an invocation example.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | Path to the Luau file within the executor workspace to compile-check, e.g. 'scripts/main.lua'. | |
| timeoutMs | No | Optional per-call deadline in milliseconds; omit it to use the tool or server default. | |
| threadContext | No | Optional Roblox thread identity for this call; omit it to use the server default. |