Skip to main content
Glama
okenjioxx

Roblox Executor MCP Server

by okenjioxx

Find functions sharing the same upvalue table (closure clusters)

find-upvalue-sharing
Read-onlyIdempotent

Scan Luau functions in the GC, inspect their upvalues, and report TABLE upvalues shared by multiple functions to cluster closures that likely belong to the same module or factory.

Instructions

Walk every Luau function in the GC and, for each function, inspect its upvalues. Whenever an upvalue is a TABLE, record the owning function under that table's identity. After scanning, report tables that are shared as an upvalue by several distinct functions — these are typically the shared state / private module table of a single closure family, so the functions that share it belong to the same module or factory. This is how you cluster functions that were defined together (a module's methods all close over the same private table). Each entry reports the table identity, how many functions share it, and a few sample functions. Requires getgc + getupvalues; caps the scan and flags truncation. Signature: { minGroup: any?, limit: any?, maxScan: any?, threadContext: number? }. Phase: observe; cost=medium; idempotency=read-only. Requires: active-client. Capabilities: debug closure primitives. Produces: bounded-candidates. Safety: read-only. On failure: inspect tool-schema for exact fields, defaults, constraints, and an invocation example.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNoMax shared tables to return, most-shared first (default 40).
maxScanNoMax GC functions to scan (default 9000).
minGroupNoOnly report tables shared as an upvalue by at least this many distinct functions (default 3).
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/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. The description adds real behavioral context beyond them: it depends on getgc + getupvalues, caps the scan, and flags truncation, plus reports group size and sample functions. This is useful non-obvious operational detail.

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?

The core prose is front-loaded and clear, but the trailing metadata block (Phase, cost, idempotency, Safety, Produces) largely repeats the annotations and adds boilerplate. Some sentences do not earn their place.

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 usefully explains the return shape (table identity, share count, sample functions) and notes scan caps/truncation and defaults. It is essentially complete for correct invocation, though it could state prerequisites like requiring an active client more explicitly.

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 four parameters (minGroup, limit, maxScan, threadContext) are already fully documented. The description only restates the signature without adding syntax or behavioral nuance, so 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?

The description states a specific verb and resource: walking Luau functions in the GC and inspecting their upvalues to find tables shared by several functions. It clearly frames the output as closure clusters (module/factory grouping), which distinguishes it from neighbors like find-upvalue-xref and get-function-upvalues.

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?

It gives a concrete when-to-use case — clustering functions defined together via a shared private table. However it does not name an explicit alternative (e.g. find-upvalue-xref or get-function-upvalues) or state when-not to use this tool, leaving that 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