Skip to main content
Glama
okenjioxx

Roblox Executor MCP Server

by okenjioxx

Find detached instances (in registry, off the DataModel)

find-detached-instances
Read-onlyIdempotent

Scan the executor's instance registry to report objects detached from the running game, including Destroy()'d or nil-reparented instances, and filter results by ClassName.

Instructions

Walk every instance the executor can see (getinstances) and report the ones that are DETACHED from the running game — i.e. they exist in the executor's instance registry but pcall(inst.IsDescendantOf, inst, game) returns false, so they are not reachable from the DataModel. This catches objects that were Destroy()'d or reparented to nil yet kept alive by a lingering reference, plus anything an anti-detection script has stashed off the hierarchy. An optional className filter narrows the walk to a single ClassName (matched via IsA so subclasses are included). Unlike find-hidden-instances (which uses an ancestor-walk to test reachability), this tool uses IsDescendantOf against game directly, supports a class filter, and always reports a full byClass breakdown across ALL detached instances. Returns { totalDetached, byClass, truncated, samples: [{ class, name }] }. Requires getinstances; degrades with a clear error otherwise. Signature: { className: 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
limitNoMax number of detailed sample instances to return in the samples list (default 200, clamped to 2000). The totalDetached count and byClass tally always cover every detached instance found regardless of this limit.
maxScanNoMax number of instances to examine from getinstances() before stopping (default 60000, clamped to 500000). Protects against huge games; if hit, `truncated` is set true.
classNameNoOptional ClassName to filter to, e.g. 'RemoteEvent', 'LocalScript', 'ScreenGui', 'Part'. Matched with inst:IsA(className) so subclasses are included. Omit to report detached instances of every class.
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 cover the safety profile (readOnly/idempotent/non-destructive), and the description adds substantial context on top: it names the underlying mechanism (getinstances + IsDescendantOf), explains what kinds of objects it surfaces (Destroy()'d, reparented to nil, anti-detection stashes), discloses the truncation flag behavior, and the dependency failure mode. This is well beyond what the annotations provide.

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-loads the core definition and the sibling contrast before the return shape and metadata tail. The trailing boilerplate (Phase/cost/idempotency/Requires/Produces/Safety/On failure) partially duplicates the annotations and is somewhat verbose, but the substantive content is dense and earns its place.

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 supplies the return shape ({ totalDetached, byClass, truncated, samples }), the prerequisite (getinstances), the failure behavior, and the capability boundary versus the sibling tool. Nothing an agent needs to call this 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 all four parameters are already documented in the schema, including limit/maxScan clamping and className IsA matching. The description restates className semantics and the 'always reports full byClass breakdown' behavior but adds no syntax, format, or constraint detail not already in the schema, so the 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 specific verb (walk/report) and resource (instances detached from the DataModel), and defines 'detached' precisely via pcall(inst.IsDescendantOf, inst, game) returning false. It explicitly contrasts itself with the sibling find-hidden-instances, so an agent can differentiate without opening either 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?

Explicitly names the alternative (find-hidden-instances) and the mechanism that distinguishes them (IsDescendantOf vs ancestor-walk), plus the class-filter and full-byClass capabilities unique to this tool. It also states the prerequisite ('Requires getinstances; degrades with a clear error otherwise'), giving clear when-to-use and when-not conditions.

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