Skip to main content
Glama
okenjioxx

Roblox Executor MCP Server

by okenjioxx

getscriptbytecode — dump a script's compiled bytecode

get-script-bytecode
Read-onlyIdempotent

Retrieve compiled Luau bytecode for a Roblox script by its path, returning the total byte count and a hex preview.

Instructions

Retrieve the compiled Luau bytecode for a script via the executor's getscriptbytecode. The script is resolved from a Luau expression (typically a path to a LuaSourceContainer, e.g. 'game.ReplicatedStorage.Module') via loadstring('return ' .. expr). Returns the total byte count and a hex preview of the first previewBytes bytes (the full bytecode is not shipped across the bridge). Requires getscriptbytecode — type-guarded and pcall-wrapped, returning { error } when missing or on failure. Returns { byteCount, hexPreview } or { error }. Signature: { scriptPath: string, previewBytes: any?, threadContext: number? }. Phase: orchestrate; cost=high; idempotency=read-only. Requires: active-client, resolved-target. Capabilities: getscriptbytecode. Produces: structured-observation. Safety: read-only. On failure: inspect tool-schema for exact fields, defaults, constraints, and an invocation example.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
scriptPathYesLuau expression resolving to a LuaSourceContainer, e.g. 'game.ReplicatedStorage.Module'. Evaluated as `return <expression>`.
previewBytesNoHow many leading bytecode bytes to include as a hex preview (default 64).
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
Behavior5/5

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

Annotations already declare read-only/idempotent, but the description adds real behavioral depth: the call is type-guarded and pcall-wrapped, returns { error } when the capability is missing or on failure, and crucially warns that the full bytecode is NOT shipped across the bridge (only a hex preview). That is exactly the kind of context annotations cannot 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 core behavior and failure modes are front-loaded and useful, but the trailing meta-block (Phase, cost, idempotency, Requires, Capabilities, Produces, Safety, On failure) and the inline 'Signature' line duplicate structured data already in the schema and annotations, adding bulk without new 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?

With no output schema, the description fully compensates by naming the return shapes ({ byteCount, hexPreview } or { error }), the truncation behavior, and the required capability. Nothing an agent needs to invoke or interpret the call 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 baseline is 3, but the description adds meaning beyond the schema: it explains that scriptPath is evaluated via loadstring('return ' .. expr) resolving to a LuaSourceContainer, and that threadContext defaults to the server identity. It restates previewBytes/threadContext types in the inline signature line, which is redundant rather than additive.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb (retrieve/dump) and a precise resource (compiled Luau bytecode for a script), which implicitly separates it from source-oriented siblings like get-script-content and get-module-source. However, it never names an alternative sibling or draws an explicit contrast, so differentiation is left to the reader.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

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

It provides prerequisites (active-client, resolved-target, getscriptbytecode capability) and a phase/cost label, which gives usable context. But it never states when to prefer this over get-script-content, get-script-hash, or disassemble-function, so the alternative-selection guidance is only implied.

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