Skip to main content
Glama
okenjioxx

Roblox Executor MCP Server

by okenjioxx

Toggle a metatable's read-only flag (MUTATES live state)

set-metatable-readonly
Destructive

Toggle a live metatable's read-only flag so you can edit or hook metamethods, then re-lock it to avoid anticheat tripwires or crashes.

Instructions

WRITES LIVE GAME STATE. DANGER — Resolve a Luau expression to a metatable (usually getrawmetatable(obj)) and flip its read-only flag via setreadonly. Most game metatables (e.g. getrawmetatable(game)) are locked read-only so __index/__namecall cannot be overwritten. Pass readonly=false to temporarily unlock a metatable so you can edit a metamethod (or run hook-metamethod), then call this again with readonly=true to RE-LOCK it — leaving a core metatable writable is a classic anticheat tripwire and can crash or destabilize the game. This changes the live runtime; it does not create a copy. Requires setreadonly. Because it mutates state you MUST pass confirm=true; otherwise the tool refuses and does nothing. Returns { Target, ReadOnly, ok } or { error }. Signature: { targetPath: string, readonly: boolean, confirm: boolean, threadContext: number? }. Phase: act; cost=medium; idempotency=idempotent-write. Requires: active-client, resolved-target, explicit-mutation-approval. Capabilities: getrawmetatable. Produces: structured-observation, 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
confirmYesSafety gate. Must be exactly true to apply the change. If omitted or false the tool refuses and does nothing, because toggling read-only on a live metatable can destabilize the game or trip anticheat.
readonlyYesThe new read-only state. false = unlock the metatable so its metamethods can be edited/hooked; true = re-lock it. Always re-lock when you are done to avoid leaving the game in an unprotected, anticheat-suspicious state.
targetPathYesLuau expression resolving to the metatable (a table) whose read-only flag you want to change, e.g. 'getrawmetatable(game)', 'getrawmetatable(game.Players.LocalPlayer)', or 'getgenv().SomeLockedTable'. Evaluated as `return <targetPath>`. Should resolve to a table — non-tables will error.
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.1/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=false and destructiveHint=true, and the description adds real value beyond them: it writes the live runtime rather than a copy, requires confirm=true or refuses, returns {Target, ReadOnly, ok} or {error}, and carries crash/anticheat consequences. The one blemish is that its own metadata line claims 'idempotency=idempotent-write' while the annotations declare idempotentHint=false — an internal inconsistency that keeps this from a 5.

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 critical warning ('WRITES LIVE GAME STATE. DANGER') is correctly front-loaded and the workflow paragraph earns its place, but the tail is appended machine metadata ('Phase: act; cost=medium; ... Requires: ... Capabilities: ... Produces: ... Verify with: ... On failure: inspect tool-schema...') that pads the definition without helping selection or invocation.

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 destructive, no-output-schema mutation tool this is complete: it covers purpose, required approval, prerequisites, failure behavior, verification path (assert-state), and even the return shape. An agent has everything needed to call it correctly and to know what to do afterward.

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% and every parameter (confirm, readonly, targetPath, threadContext) is already fully documented in the schema, including the confirm safety gate and the Luau-expression evaluation of targetPath. The description restates the signature and the confirm rule but adds no semantics the schema lacks, 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+mechanism: 'Resolve a Luau expression to a metatable (usually getrawmetatable(obj)) and flip its read-only flag via setreadonly.' It also distinguishes itself from nearby siblings (get-metatable, is-readonly, set-rawmetatable) by naming the exact target form and the live-state mutation, so an agent can pick it without opening schemas.

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 and workflow: unlock with readonly=false to edit a metamethod or run hook-metamethod, then re-lock with readonly=true, and it warns that leaving a core metatable writable is an anticheat tripwire. It also lists prerequisites (active-client, resolved-target, explicit-mutation-approval). It stops short of explicit 'use X instead of this' routing to siblings, so 4 rather than 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