Skip to main content
Glama
okenjioxx

Roblox Executor MCP Server

by okenjioxx

Dump a script's environment (getsenv)

get-script-env
Read-onlyIdempotent

Resolve a running LocalScript/ModuleScript path and dump its live _ENV via getsenv to discover globals, exposed locals, functions, and values for inspection or hooking.

Instructions

Resolve an instance path to a running LocalScript/ModuleScript and dump its script environment table via getsenv. This is the live _ENV of that script: its globals, every top-level local it exposed as a global, and the functions/values it defined. Use it to discover what a script holds (config flags, references, handler functions) so you can then inspect or hook them by reference (e.g. feed getsenv(script).someFunc into inspect-closure or hook-function). The script must be currently running for getsenv to succeed. Requires getsenv. Returns { Script, KeyCount, Truncated, Keys } (keysOnly) or { Script, KeyCount, Truncated, Entries } or { error }. Signature: { scriptPath: string, keysOnly: any?, maxKeys: any?, threadContext: number? }. Phase: orchestrate; cost=medium; idempotency=read-only. Requires: active-client, resolved-target. 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
maxKeysNoMaximum number of environment keys/entries to return before truncating (default 200).
keysOnlyNoWhen true (default) return only the environment key names — cheap and safe. When false also serialize each value's type and a scalar/string preview via __encVal.
scriptPathYesLuau expression resolving to the LocalScript/ModuleScript instance, e.g. 'game.Players.LocalPlayer.PlayerScripts.Main' or 'game:GetService("ReplicatedStorage").Modules.Net'. Evaluated as `return <scriptPath>`; must yield a running script 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.4/5.0
Behavior4/5

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

Annotations already declare readOnly/idempotent/non-destructive, so the safety profile is covered. The description adds genuinely useful behavior beyond that: the running-script requirement, keysOnly's cheap-and-safe default mode, maxKeys truncation, and the exact success/error return shapes. It doesn't discuss performance cost beyond the phase metadata, but the added context is solid.

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 purpose, then use case, then constraints, then return shapes — a sensible order. It is somewhat long and the trailing metadata block (Phase/cost/idempotency/Requires/Produces/Safety) partially duplicates the annotations and schema, but nothing is truly wasted.

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 three return variants ({Keys}, {Entries}, {error}), the required runtime precondition, the prerequisite capabilities (getsenv, active-client, resolved-target), and failure handling. An agent has everything needed to invoke and interpret it.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so the baseline is 3, but the description adds value by tying parameters to outcomes: keysOnly drives which return shape appears ({Keys} vs {Entries}) and notes keysOnly's cheap/safe default, and it contextualizes the scriptPath semantics. This goes beyond merely restating the schema.

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) and resource (a running LocalScript/ModuleScript's environment table), naming the underlying primitive (getsenv) and the exact contents (globals, exposed top-level locals, defined functions). This clearly differentiates it from env-related siblings like dump-function-env, get-function-env, and list-global-env-keys.

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 a concrete use case and routes the agent forward: 'Use it to discover what a script holds ... so you can then inspect or hook them ... feed getsenv(script).someFunc into inspect-closure or hook-function.' It also states a hard precondition ('The script must be currently running'). It stops short of an explicit when-not-to-use or a direct contrast with the nearest sibling (dump-function-env).

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