Skip to main content
Glama
okenjioxx

Roblox Executor MCP Server

by okenjioxx

Hook a function and log every call (turnkey instrumentation, MUTATES STATE)

hook-and-log-function
Destructive

Hook a target function to log every call's arguments, returns, and timestamp. Fetch the captured log and restore the original to stop tracing.

Instructions

DANGER — INSTALLS A PERSISTENT GLOBAL HOOK. Turnkey call-tracing for any function: hook a target, automatically record every invocation (stringified arguments + return values + a timestamp), then fetch the captured call log and restore the original — all from three actions of this one tool. This is the fastest way to answer 'what is this function actually called with, how often, and what does it return?' without hand-writing a hook. WORKFLOW (stateful — survives across tool calls via getgenv().__mcp_fnlogs, keyed by functionPath): 1. action='start' with functionPath — resolves the target, captures the original, installs a logging hook that transparently calls the original and records up to maxCalls invocations. Returns { started, key }. 2. action='fetch' with the same functionPath — reads the accumulated call log so far WITHOUT stopping it. Returns { count, max, calls } where each call is { args[], returns[], t }. Call repeatedly to watch live. 3. action='stop' with the same functionPath — restores the original function and removes the registry entry. Returns { stopped }. ALWAYS stop when done. CAVEATS: The hook is GLOBAL and PERSISTS until you stop it (or the client restarts). It adds overhead on every call to the target and CAN TRIP ANTICHEAT or destabilize the game, especially on hot paths — prefer specific, low-frequency targets and keep maxCalls modest. Arguments/returns are captured by tostring (Instances become GetFullName()) and both arrays are capped at 8 entries each. Logging stops accumulating once maxCalls is reached, but the hook stays installed (and keeps calling the original) until you stop it. Requires hookfunction, newcclosure, and getgenv; restoration uses hookfunction(target, original) with a restorefunction fallback. Returns { error } with a clear message if a capability is missing, the target cannot be resolved, or there is no active log for fetch/stop. Signature: { action: "start" | "fetch" | "stop", functionPath: string?, maxCalls: any?, threadContext: number? }. Phase: act; cost=medium; idempotency=contextual-write. Requires: active-client, resolved-target, explicit-mutation-approval. Produces: structured-result. Verify with: is-function-hooked. Safety: MUTATING; changes persistent executor-side observer or hook state. On failure: inspect tool-schema for exact fields, defaults, constraints, and an invocation example.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
actionYesWhat to do: 'start' installs the logging hook on functionPath; 'fetch' returns the call log captured so far (hook stays live); 'stop' restores the original function and clears the log. Use the SAME functionPath for all three so they address the same registry entry.
maxCallsNoMaximum number of calls to record before logging stops accumulating (default 100). On 'start' this sizes the ring of captured calls; on 'fetch' it caps how many entries are returned in this response. Keep modest on hot paths to limit overhead and output size.
functionPathNoLuau expression resolving to the function to instrument, e.g. 'getsenv(game.Players.LocalPlayer.PlayerScripts.Main).validate', 'getrawmetatable(game).__namecall', or 'getconnections(game.Workspace.Part.Touched)[1].Function'. Evaluated as `return <functionPath>` and must resolve to a function. REQUIRED for 'start'. For 'fetch'/'stop' it is the registry key identifying which running log to act on, so it must match the string used at start (defaults to the start expression).
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?

Annotations already flag destructive/mutating and non-idempotent, but the description goes far beyond them: persistence via getgenv().__mcp_fnlogs, global lifetime until stop/restart, per-call overhead, anticheat/destabilization risk on hot paths, tostring-based capture with arrays capped at 8 entries, maxCalls semantics, required capabilities (hookfunction/newcclosure/getgenv), the restore fallback, and error-return behavior. This is exactly the extra 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?

Front-loaded with a DANGER warning and then the workflow, so the critical risk and sequence come first. It is long, and some content (action semantics, signature) is repeated in both prose and signature form, but the length is largely justified by the tool's stateful, mutating nature.

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, stateful mutation tool with no output schema, the description specifies the return shapes ({started,key}, {count,max,calls}, {stopped}, {error}), failure modes, capability requirements, and lifecycle rules. Nothing an agent needs to invoke it correctly and clean up afterward 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 action, functionPath, maxCalls, and threadContext thoroughly. The description's signature and registry-key notes largely restate the schema rather than adding new semantic detail, 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 precise compound action: install a persistent global hook, record invocations (args/returns/timestamp), fetch the log, and restore the original — all in one tool. It clearly distinguishes itself from hand-writing a hook and from single-purpose siblings like hook-function, list-hooks, and restore-hook by framing itself as the 'turnkey' three-action alternative.

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?

Provides an explicit numbered workflow (start/fetch/stop) with the conditions that select each action, states the use case ('fastest way to answer what is this function called with'), and gives when-not-to-use guidance ('prefer specific, low-frequency targets', 'ALWAYS stop when done'). It does not explicitly name sibling alternatives (hook-function/restore-hook), 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