Skip to main content
Glama
okenjioxx

Roblox Executor MCP Server

by okenjioxx

Hook a live function with a replacement (MUTATES STATE)

hook-function
Destructive

Intercept and replace a live Roblox game function with custom code so all calls run your replacement; use it to log or rewrite arguments, spoof returns, or disable checks.

Instructions

WRITES LIVE GAME STATE. DANGER — MUTATES STATE PERSISTENTLY. Resolve a target function and replace it with your own function via hookfunction. After hooking, every call to the target — from anywhere in the game — runs your replacement instead. This is the core primitive for intercepting/altering game behavior: log or rewrite arguments, spoof return values, or no-op a check. The hook is GLOBAL and PERSISTS until undone, so it can easily destabilize the game or trip anticheat. The original function is captured and stored in getgenv().__mcp_hooks keyed by the target expression so you can recover it; you (or your replacement) can call the original, and you can fully undo the hook with restorefunction(target). Requires hookfunction. Pass confirm=true to proceed. Returns { Target, Hooked, OriginalStored } or { error }. Signature: { targetPath: string, hookFunction: string, confirm: boolean, 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
confirmYesMust be true to actually install the hook (global, persistent mutation). When omitted or false, the tool refuses and changes nothing.
targetPathYesLuau expression resolving to the function to hook (the one whose calls you want to intercept), e.g. 'getsenv(game.Players.LocalPlayer.PlayerScripts.Main).validate' or 'getrawmetatable(game).__namecall'. Evaluated as `return <targetPath>`.
hookFunctionYesRaw Luau expression that evaluates to the REPLACEMENT function. Typically a function literal, e.g. 'function(...) print("called", ...) return getgenv().__mcp_hooks[<target>](...) end' or 'newcclosure(function(...) return true end)'. To call the original from inside your hook, read it from getgenv().__mcp_hooks. Evaluated as `return <hookFunction>` and must resolve to a function.
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.3/5.0
Behavior5/5

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

Annotations already flag destructiveHint=true and idempotentHint=false, yet the description adds substantial behavior: the hook is GLOBAL and PERSISTS until undone, the original is captured into getgenv().__mcp_hooks keyed by target, it can destabilize/trip anticheat, it requires hookfunction and explicit-mutation-approval, and it can be fully undone via restorefunction. This is well beyond what structured fields convey.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The destructive warning is correctly front-loaded, but the mutation caveat is repeated three times ('WRITES LIVE GAME STATE', 'MUTATES STATE PERSISTENTLY', 'MUTATING') and the trailing metadata block (Phase/cost/idempotency/Produces/Verify) is templated filler rather than agent-critical content. Dense but padded.

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 still discloses the return shape ({ Target, Hooked, OriginalStored } or { error }), the recovery path, verification via is-function-hooked, prerequisites, and failure guidance. Nothing an agent needs to invoke and recover this mutation 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 targetPath, hookFunction, confirm, and threadContext are already fully documented with evaluation rules and examples. The description's 'Pass confirm=true to proceed' and inline signature only restate what the schema provides, 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+resource ('Resolve a target function and replace it with your own function via hookfunction') and describes the exact mechanism and scope (global interception). An agent can distinguish this core primitive from narrower siblings like hook-and-log-function or spoof-function-return 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 Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Gives clear when-to-use context ('core primitive for intercepting/altering game behavior: log or rewrite arguments, spoof return values, or no-op a check') plus the confirm=true prerequisite and undo path. However it never names or routes to the close alternatives (hook-and-log-function, block-function, spoof-function-return), so an agent with only logging intent gets no explicit redirection.

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