Skip to main content
Glama
okenjioxx

Roblox Executor MCP Server

by okenjioxx

Find all GC references to a specific table (reverse ownership scan)

find-table-references
Read-onlyIdempotent

Find which tables and closures reference a target Luau table by scanning GC objects, so you can identify owners, captured upvalues, or why it is not collected.

Instructions

Answer 'who holds this table alive / who can reach it?' Resolve a Luau expression to a target TABLE, then walk the entire GC and record every OTHER object that references it: (1) for each GC TABLE, pcall-iterate pairs() and if any VALUE is the target, record { container, via='value', key } (the surrounding key text); (2) for each Lua CLOSURE, scan its upvalues (getupvalues, guarded) and if any UPVALUE is the target, record { container, via='upvalue', key } where container is the function's source:line (via debug.info / getinfo). The target table itself is skipped so it never lists itself. This is the inverse of the look-down tools (read-path-value, dump-table): use it to find the owner of a shared state/config table, to discover which closures captured it (so you can hook or inspect them), or to understand why a table is not being collected. Every access is pcall-guarded so locked objects never abort the scan; GC objects examined are capped by maxScan and results by limit, with a 'truncated' flag. Requires getgc; upvalue scanning additionally needs getupvalues (type-guarded — skipped if absent). Returns { target, referenceCount, scannedObjects, truncated, references } or { error }. Signature: { tableExpr: string, limit: any?, maxScan: any?, threadContext: number? }. Phase: observe; cost=medium; idempotency=read-only. Requires: active-client. 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
limitNoMaximum number of references to return (default 100). Hitting this sets truncated=true.
maxScanNoMaximum number of GC objects to examine before stopping (default 40000). Hitting this sets truncated=true. Raise for a deeper sweep at the cost of time; lower if scans are slow.
tableExprYesLuau expression resolving to the target TABLE whose references you want to find, e.g. 'getgenv().PlayerData', 'require(game.ReplicatedStorage.Config)', '_G.Settings', or any table reference from a prior scan. Evaluated as `return <tableExpr>` and must resolve to a table.
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 read-only/idempotent/non-destructive, but the description adds substantial context beyond them: every access is pcall-guarded, the target is skipped to avoid self-listing, upvalue scanning is type-guarded and skipped if getupvalues is absent, requires getgc, and scans/results are capped with a truncated flag. This is exactly the behavioral disclosure the rubric rewards.

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 core question is front-loaded and the algorithmic detail is valuable, but the trailing block (Signature/Phase/cost/idempotency/Requires/Produces/Safety/On failure) partially duplicates annotations and schema and lengthens the text. Efficient overall, with 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?

For a complex GC-walking tool with no output schema, the description supplies return shapes ({ target, referenceCount, scannedObjects, truncated, references } or { error }), prerequisites (getgc, optional getupvalues), and the truncation contract. Nothing an agent needs to invoke it correctly is missing.

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 limit, maxScan, tableExpr, and threadContext thoroughly. The description restates the signature and the limit/maxScan/truncated interplay but adds no syntax or format detail beyond the schema, 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?

States a precise verb+resource+scope: resolve a Luau expression to a target table, then walk the GC recording every OTHER object that references it. It explicitly positions itself against siblings ('the inverse of the look-down tools (read-path-value, dump-table)'), so an agent can distinguish it without opening any 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 concrete when-to-use scenarios (find the owner of a shared state/config table, discover capturing closures, diagnose why a table is not collected) and names the contrasting alternatives. The dual-value vs upvalue modes are laid out, so the agent knows what this returns and when it is the right choice.

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