Skip to main content
Glama
okenjioxx

Roblox Executor MCP Server

by okenjioxx

Read a closure's constant pool

get-closure-constants
Read-onlyIdempotent

Resolve a Luau expression to a function and dump its constant pool via getconstants. Use strings, numbers, and names to fingerprint closure behavior without reading source.

Instructions

Resolve a Luau expression to a function and dump its constant pool via getconstants. Constants are the literal values the bytecode references — strings, numbers, table keys, global names, and embedded function/method names — so they are the fastest way to fingerprint what a closure does (e.g. spotting a 'FireServer' literal, a remote name, a damage value, or a URL) without reading its source. This is the by-reference companion to the GC-wide scanners (find-functions-by-constant / find-constants-xref): use it once you already hold the function (a remote handler, a metamethod, getsenv(script).fn, etc.). Each entry reports its 1-based Index, Luau Type, and an encoded Value. Requires the executor's getconstants (debug.getconstants); if unavailable a clean { error } is returned. Returns { Target, Info, Constants:[{Index,Type,Value}], Count } or { error }. Signature: { functionPath: string, 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 whose constants you want, e.g. 'getsenv(game.Players.LocalPlayer.PlayerScripts.Main).update', 'getrawmetatable(game).__namecall', or 'getconnections(game.ReplicatedStorage.Remote.OnClientEvent)[1].Function'. 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

A4.6/5.0
Behavior5/5

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

Annotations already declare readOnlyHint, idempotentHint, and destructiveHint=false, so the safety profile is covered. The description goes beyond them by disclosing the hard dependency on the executor's getconstants (debug.getconstants), the clean { error } fallback when unavailable, the prerequisite state (active-client, resolved-target), and a cost rating of medium.

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?

The description is front-loaded with purpose, then usage, output shape, and metadata tags in a logical order. It is dense but somewhat long, and the Signature line partly duplicates the schema; nearly every sentence earns its place, but there is minor redundancy.

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 fully specifies the return shape ({ Target, Info, Constants:[{Index,Type,Value}], Count } or { error }), the invocation dependency, and failure behavior. An agent has everything needed to call it and interpret results.

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 with examples and threadContext fully. The description only restates the signature '{ functionPath: string, threadContext: number? }', adding little beyond what structured fields provide. Baseline 3 is correct when the schema does the heavy lifting.

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?

The description states a specific verb and resource: 'Resolve a Luau expression to a function and dump its constant pool via getconstants.' It further defines what a constant is (strings, numbers, table keys, global names, embedded function labels), which distinguishes this tool from siblings like get-closure-upvalues or get-closure-protos.

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?

It explicitly positions the tool as 'the by-reference companion to the GC-wide scanners (find-functions-by-constant / find-constants-xref): use it once you already hold the function.' This names the alternatives and the precise condition that selects this tool over them, leaving nothing to inference.

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