Skip to main content
Glama
okenjioxx

Roblox Executor MCP Server

by okenjioxx

Set an upvalue of a live function (MUTATES STATE)

set-closure-upvalue
Destructive

Patch a live function in place by overwriting its 1-based captured upvalue via a resolved Luau expression; requires confirm=true and persists for future calls.

Instructions

WRITES LIVE GAME STATE. DANGER — Resolve a Luau expression to a function and overwrite one of its upvalues (a variable captured by the closure) via setupvalue. Use this to patch a function's behavior in place without rehooking it — e.g. flip a captured enabled boolean, swap a captured config table, or zero out a captured cooldown. The change persists for every future call of that exact closure and is shared by all closures that captured the same upvalue, so it can destabilize the game or trip anticheat. Index is 1-based and must be within the function's upvalue count (inspect-closure reports UpvalueCount). Requires setupvalue. Pass confirm=true to proceed. Returns { Target, Index, ok } or { error }. Signature: { functionPath: string, index: number, value: { kind: "string" | "number" | "boolean" | "nil" | "raw", value: string | number | boolean? }, confirm: boolean, threadContext: number? }. Phase: act; cost=medium; idempotency=idempotent-write. Requires: active-client, resolved-target, explicit-mutation-approval. Capabilities: debug closure primitives. Produces: operation-receipt. Verify with: assert-state. Safety: MUTATING; writes live game/client state. On failure: inspect tool-schema for exact fields, defaults, constraints, and an invocation example.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
indexYes1-based index of the upvalue to overwrite. Must be within the function's upvalue count (see UpvalueCount from inspect-closure).
valueYesNew value for the upvalue. kind 'string'|'number'|'boolean' uses value literally; kind 'nil' sets nil; kind 'raw' treats value as a Luau expression evaluated for its result (e.g. value='Vector3.new(0,0,0)' or 'game.Workspace').
confirmYesMust be true to actually mutate the live function. When omitted or false, the tool refuses and changes nothing.
functionPathYesLuau expression resolving to the function whose upvalue you want to change, e.g. 'getsenv(game.Players.LocalPlayer.PlayerScripts.Main).update' or 'getrawmetatable(game).__namecall'. Evaluated as `return <functionPath>`.
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/5.0
Behavior2/5

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

The description adds excellent context beyond the annotations (persistence across all future calls, sharing across closures that captured the same upvalue, anticheat risk, confirm gating). However it declares 'idempotency=idempotent-write', which directly conflicts with the annotation idempotentHint=false, so the description contradicts structured metadata on a key behavioral trait.

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 highest-severity fact ('WRITES LIVE GAME STATE. DANGER') and then organized into use case, constraints, signature, and failure handling. It is long and the signature block duplicates the schema, but nearly every sentence carries actionable information.

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, destructive mutation tool with no output schema, the description supplies the return shape ({ Target, Index, ok } / { error }), prerequisites, verification route (assert-state), confirm gating, and failure guidance. Nothing critical to correct invocation is missing.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so parameters are already fully documented; the description mostly restates the signature. It still adds value by tying the index bound to a cross-tool workflow ('inspect-closure reports UpvalueCount') and clarifying the raw kind's evaluation semantics, which helps correct invocation.

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 verb+resource: resolve a Luau expression to a function and overwrite one of its upvalues via setupvalue. It cleanly distinguishes itself from siblings like get-closure-upvalues, set-closure-constant, and set-function-env, and the danger/mutation scope is stated up front.

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 when-to-use examples ('flip a captured enabled boolean, swap a captured config table'), an implied alternative ('patch in place without rehooking it' vs hook-function), a prerequisite ('Requires setupvalue') and a gate ('Pass confirm=true'). It stops short of explicitly naming an alternative sibling tool to use instead, so it is strong but not fully routable.

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