Skip to main content
Glama
okenjioxx

Roblox Executor MCP Server

by okenjioxx

Inspect a function/closure by reference

inspect-closure
Read-onlyIdempotent

Resolve a Luau expression to a function and dump its closure details—Lua/C type, source, params, upvalues, constants, proto count, and hash—to inspect known handler, metamethod, or getsenv reference.

Instructions

Resolve a Luau expression to a function and dump everything about it in one call: whether it's a Lua or C closure, its name/source/line/param count/upvalue count (via getinfo), its constants, its upvalues (captured values), its nested-proto count, and its function hash. This is the by-reference counterpart to the gc-scan tools (scan-closures-by-*) — use it when you already have a handle on the function (e.g. a remote's OnClientEvent handler, a metamethod, or getsenv(script).someFunc). Requires getinfo/getconstants/getupvalues as available; missing capabilities are simply omitted. Returns { Target, Info, Constants, Upvalues, ProtoCount, FunctionHash } or { error }. Signature: { functionPath: string, includeConstants: any?, includeUpvalues: any?, threadContext: number? }. Phase: observe; 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
functionPathYesLuau expression resolving to a function, e.g. 'getsenv(game.Players.LocalPlayer.PlayerScripts.Main).update', 'getrawmetatable(game).__namecall', or 'getconnections(game.Workspace.Part.Touched)[1].Function'. Evaluated as `return <functionPath>`.
threadContextNoOptional Roblox thread identity for this call; omit it to use the server default.
includeUpvaluesNoInclude the function's upvalues — its captured variables (default true).
includeConstantsNoInclude the function's constants table (default true).

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv2.0.0-spies.2

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already declare read-only/idempotent/non-destructive, so the safety profile is covered. The description adds real behavior beyond that: it depends on getinfo/getconstants/getupvalues being available and silently omits missing capabilities, and it names the exact return payload fields. It stops short of detailing failure modes beyond 'inspect tool-schema', hence not a 5.

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 purpose and what gets dumped, then usage routing, then return shape. The trailing metadata block (phase/cost/idempotency/requires/capabilities/produces/safety/on-failure) is partly redundant with annotations and the schema, but the payload itself is dense and earns its space.

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 compensates by enumerating the return object ({ Target, Info, Constants, Upvalues, ProtoCount, FunctionHash } or { error }), the required context (active-client, resolved-target), and capability dependencies. An agent has everything needed to call and interpret the result.

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 all four parameters (functionPath, includeConstants, includeUpvalues, threadContext) are already documented in the schema, including defaults and the `return <functionPath>` evaluation semantics. The description's signature line largely restates the schema, so the baseline 3 applies.

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 + dump) on a specific resource (a function/closure), enumerating exactly what is reported: closure kind, getinfo fields, constants, upvalues, proto count, hash. It explicitly positions itself as the by-reference counterpart to the gc-scan/scan-closures-by-* siblings, so an agent can distinguish it without opening another schema.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

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

Gives the precise precondition ('use it when you already have a handle on the function') and concrete examples (remote OnClientEvent handler, metamethod, getsenv(script).someFunc), and names the alternative family (scan-closures-by-*) for the case where you don't have a reference. When-to-use vs. when-not is explicit.

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