Skip to main content
Glama
okenjioxx

Roblox Executor MCP Server

by okenjioxx

Dump a function's environment (getfenv)

get-function-env
Read-onlyIdempotent

Resolve a Luau expression to a function and dump its environment table to inspect reachable globals, detect sandbox/proxy environments, and discover sibling functions for inspection or hooking.

Instructions

Resolve a Luau expression to a function and dump its function environment table via getfenv. This is the _ENV the function reads its globals from: the global table the closure sees (often the script's environment, or a sandboxed proxy). Use it to learn what globals a handler can reach, to spot a sandbox/proxy environment, or to discover sibling functions you can then inspect or hook by reference. Read-only. Requires getfenv. Returns { Target, KeyCount, Truncated, Keys } (keysOnly) or { Target, KeyCount, Truncated, Entries } or { error }. Signature: { functionPath: string, keysOnly: any?, maxKeys: any?, threadContext: number? }. Phase: observe; 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.
functionPathYesLuau expression resolving to a function, e.g. 'getsenv(game.Players.LocalPlayer.PlayerScripts.Main).update', 'getrawmetatable(game).__namecall', or a function found via the gc-scan tools. Evaluated as `return <functionPath>`.
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

A3.8/5.0
Behavior4/5

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

Annotations already cover the safety profile (readOnlyHint, idempotentHint, destructiveHint=false), so the bar is lower, and the description still adds real context: it names the hard dependency on getfenv being available, states the prerequisites (active-client, resolved-target), and describes the two return shapes. That is useful disclosure beyond the annotations, though the repeated 'Read-only / idempotency=read-only / Safety: read-only' adds little.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loads the core action correctly in the first sentence, but the tail is padded with metadata blocks ('Phase: observe; cost=medium; idempotency=read-only', 'Produces: structured-observation', 'Safety: read-only') that restate the annotations and return shape. Those lines cost tokens without adding decision-relevant information.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/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 correctly takes on return-value disclosure by enumerating both response shapes plus the error case. It also names prerequisites and a failure fallback (inspect tool-schema). Complete enough to call correctly, with only the sibling ambiguity as a residual gap.

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 the schema already documents functionPath syntax, keysOnly behavior, maxKeys truncation, and threadContext defaults. The description's signature line and its '(keysOnly)' / 'Entries' hint only map return shape to keysOnly, which the schema already states. This is baseline-3 territory: no meaningful semantics added beyond structured fields.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource: resolve a Luau expression to a function and dump its function environment table via getfenv, with a clarifying gloss that this is the _ENV the closure reads globals from. That is far more specific than a tautology. It does not, however, differentiate itself from the very similar siblings 'dump-function-env', 'get-script-env', or 'set-function-env', so an agent cannot tell from the text alone which environment tool to pick.

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 three concrete when-to-use cases: learn what globals a handler can reach, spot a sandbox/proxy environment, and discover sibling functions to inspect or hook by reference. That is clear usage context rather than implied usage. It names no explicit alternative tool or exclusion condition, which is what separates this from a 5.

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