Skip to main content
Glama
okenjioxx

Roblox Executor MCP Server

by okenjioxx

Find xrefs TO a function (IDA 'xrefs to')

find-function-xrefs
Read-onlyIdempotent

Resolve a Roblox Luau function from an expression, then find every GC function that references it via upvalues or nested protos.

Instructions

Resolve a target Luau FUNCTION from an expression, then walk every function in the GC and report which ones REFERENCE it — the runtime equivalent of IDA's 'cross references to' on a sub. A referrer references the target if the target appears in its upvalues (closures that captured it) OR among its nested protos (functions that embed it as an inner function). Each xref reports __fnInfo (ptr/name/source/line/nparams/nups) plus 'via' ("upvalue" or "proto"). The target itself is skipped. Requires getgc + getupvalues/getprotos; caps the scan and flags truncation. Pivot from list-gc-functions or lookup-function to get an expression that resolves here. Signature: { functionPath: string, limit: any?, maxScan: any?, threadContext: number? }. Phase: observe; cost=medium; idempotency=read-only. Requires: active-client, resolved-target. 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 referrer functions (xrefs) to return (default 100).
maxScanNoMax GC functions to scan (default 9000).
functionPathYesLuau expression that resolves to the TARGET function, e.g. 'getrenv().game.ReplicatedStorage.Modules.Combat.attack' or 'require(path).onHit'. Evaluated as `(loadstring('return '..expr))()`; must yield type=='function' or the tool errors.
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.2/5.0
Behavior4/5

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

Annotations already declare read-only/idempotent/non-destructive, so the bar is lower; the description adds real substance by defining what counts as a reference (upvalue capture or nested proto), noting the target is skipped, listing runtime dependencies (getgc, getupvalues/getprotos), and disclosing that the scan is capped and truncation is flagged.

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-loaded with the core behavior and the reference semantics before the signature and metadata tail. The trailing 'Phase/cost/idempotency/Safety' line partly restates the annotations and the 'On failure' pointer is boilerplate, so it is dense but not waste-free.

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 compensates by describing the return shape (per-xref __fnInfo fields plus the 'via' discriminator) and truncation behavior. An agent has everything needed to call and interpret this tool 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 all four parameters and their defaults. The description adds only marginal value beyond it (the expression must resolve to a function, scan capping), which meets the baseline-3 expectation 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?

States a specific verb (walk the GC and report referrers) and resource (a target Luau FUNCTION), and anchors it with the IDA 'cross references to' analogy. It is clearly separable from sibling xref tools such as find-string-xrefs, find-upvalue-xref, and find-global-xrefs.

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?

Names the upstream pivots ('Pivot from list-gc-functions or lookup-function to get an expression that resolves here') and states prerequisites (active-client, resolved-target). It does not state when NOT to use this versus the other xref tools, but the context is clear enough to select correctly.

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