Skip to main content
Glama
okenjioxx

Roblox Executor MCP Server

by okenjioxx

Get a script's main closure (LocalScript/ModuleScript)

get-script-closure
Read-onlyIdempotent

Retrieve a script's compiled main function from a Luau expression without executing it, enabling static bytecode analysis of protected or unexecuted scripts.

Instructions

Resolve a Luau expression to a LocalScript or ModuleScript Instance and retrieve its compiled main function via getscriptclosure (falling back to getscriptfunction if the executor exposes that name instead). The returned closure is the script's top-level chunk WITHOUT running it — so you can statically analyse a script's bytecode (its constants, upvalues, and nested protos) even when it is protected, never executed, or you don't want its side effects. This is the entry point for static RE of a single script: feed the resulting function into get-closure-constants / get-closure-upvalues / get-closure-protos to drill in. Requires the executor's getscriptclosure (or getscriptfunction); if neither exists a clean { error } is returned. Returns { Script, Function:__fnInfo, ConstantCount, UpvalueCount } or { error }. Signature: { scriptPath: string, threadContext: number? }. Phase: orchestrate; cost=medium; idempotency=read-only. Requires: active-client, resolved-target. Capabilities: debug closure primitives. Produces: structured-observation. Safety: read-only. On failure: inspect tool-schema for exact fields, defaults, constraints, and an invocation example.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
scriptPathYesLuau expression resolving to a LocalScript or ModuleScript Instance, e.g. 'game.Players.LocalPlayer.PlayerScripts.Main', 'game.ReplicatedStorage.Modules.Settings', or 'game:GetService("ReplicatedFirst").Loader'. Evaluated as `return <scriptPath>`; the value must be an Instance.
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.2/5.0
Behavior4/5

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

Annotations already cover read-only, idempotent, non-destructive, closed-world. The description adds real behavioral context beyond them: the closure is NOT executed (no side effects), the executor's getscriptclosure vs getscriptfunction fallback is disclosed, and a clean { error } is promised when neither primitive exists. Minor redundancy in restating idempotency=read-only.

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?

Front-loaded with the core action and semantics, and most sentences earn their place. The trailing metadata block (Phase/cost/idempotency/Requires/Capabilities/Produces/Safety/On-failure) is somewhat boilerplate and duplicates the annotations, slightly diluting density.

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?

With no output schema, the description still specifies the return shape ({ Script, Function:__fnInfo, ConstantCount, UpvalueCount } or { error }) plus the failure mode, fallback primitive, and downstream pipeline. An agent has everything needed to call and consume it correctly.

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 coverage is 100%, so both parameters are already fully documented, including the exact example paths and the 'return <scriptPath>' evaluation rule. The description's signature line and threadContext mention merely restate the schema, adding no new parameter semantics. Baseline 3 is appropriate.

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 (resolve/retrieve) and resource (a script's compiled main closure), and names the exact instance types it accepts (LocalScript/ModuleScript). It positions itself as the entry point of a static-RE pipeline and lists the specific sibling tools it feeds, so an agent can distinguish it from get-closure-constants/upvalues/protos.

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?

Clearly states when to reach for it — static analysis of a script that is protected, never executed, or whose side effects you want to avoid — and routes the agent to the three downstream tools. It does not explicitly exclude alternative routes (e.g. get-script-bytecode or get-script-content) for the same goal, so it stops short of full when-not guidance.

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