Skip to main content
Glama
okenjioxx

Roblox Executor MCP Server

by okenjioxx

Scan connection handlers by defining script source

scan-connections-by-source
Read-onlyIdempotent

Scan a Roblox instance hierarchy to find Lua event handlers and pinpoint which script defines each connection, filtered by source pattern.

Instructions

Sweep a hierarchy for event handlers and pinpoint which script each handler is defined in. Walks descendants of root, probes a set of signal names on each instance, and for every Lua connection describes its Function via debug.info. If the function's Source contains sourcePattern (case-insensitive substring; empty matches ALL handlers) it records { Instance, Signal, ConnectionIndex, Source, LineDefined, Name }. This answers "find every event handler defined in ", "where are all the handlers backed by this module?", or simply "enumerate all connected handlers under here and tell me their source". Requires the executor's getconnections and debug.info; degrades to a clear { error } if getconnections is unavailable (a missing debug.info merely leaves Source blank). Bounded by maxScan (instances) and maxResults (matches). Returns { Matches, MatchCount, ScannedInstances, Truncated }. Signature: { root: any?, sourcePattern: any?, signalNames: any?, maxResults: any?, maxScan: any?, threadContext: number? }. Phase: observe; cost=high; idempotency=read-only. Requires: active-client. Capabilities: getconnections. Produces: bounded-candidates, created-handle. Safety: read-only. On failure: inspect tool-schema for exact fields, defaults, constraints, and an invocation example.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
rootNoLua expression for the root instance whose descendants are scanned (e.g. 'game', 'game.Workspace', 'game.StarterGui'). Evaluated as `return <root>`. Defaults to 'game'. Narrow this to speed up the scan and reduce noise.game
maxScanNoMaximum number of descendant instances to examine. Defaults to 4000. Raise to cover larger games (slower); lower for a quick sample. If this cap is hit, Truncated is true.
maxResultsNoMaximum number of matching connections to collect before stopping the scan. Defaults to 200. If this cap is hit, Truncated is true.
signalNamesNoSignal member names to probe on each instance. When omitted, a sensible default list of commonly connected signals is used (Touched, Changed, ChildAdded, Activated, InputBegan, OnClientEvent, Heartbeat, etc.). Provide your own list to target specific events and make the scan faster.
sourcePatternNoCase-insensitive substring matched against each Lua connection's function Source (the chunk/script path reported by debug.info, e.g. a script name or asset path). When empty (default), EVERY Lua handler is matched, giving a full inventory. Set it to a script name to find only handlers defined in that script.
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.4/5.0
Behavior5/5

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

Beyond the readOnly/idempotent/non-destructive annotations, it discloses the hard dependency on getconnections and debug.info, the graceful degradation to { error } when getconnections is missing, that a missing debug.info merely blanks Source, and that results are bounded by maxScan/maxResults. That is exactly the extra behavioral context annotations cannot carry.

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 purpose and the sourcePattern/maxScan semantics are front-loaded and each sentence carries information. The trailing metadata footer (Signature, Phase, cost, idempotency, capabilities, safety) partly duplicates the annotations and schema, adding some redundancy without derailing the read.

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 high-cost, read-only scan with no output schema, the description supplies the return shape ({ Matches, MatchCount, ScannedInstances, Truncated }), truncation behavior, the required capabilities, and failure modes. An agent has everything needed to invoke it correctly.

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 every parameter (including root expression semantics, defaults, and the sourcePattern substring rule). The description largely restates sourcePattern behavior and the caps rather than adding new syntax or constraints, so the baseline 3 is appropriate.

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+resource ('sweep a hierarchy for event handlers and pinpoint which script each handler is defined in') and differentiates itself from adjacent tools like scan-closures-by-source and find-event-connections by scoping to connected handlers and their defining script. An agent can identify it without opening the schema.

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 concrete triggering questions ('find every event handler defined in <script>', 'where are all the handlers backed by this module?'), which clarifies when to reach for it. It does not, however, explicitly name competing siblings such as find-event-connections or list-signal-connections and when to prefer them, so it stops short of 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