Skip to main content
Glama
okenjioxx

Roblox Executor MCP Server

by okenjioxx

debug.getstack — read live Luau stack slots at a level

get-stack
Read-onlyIdempotent

Read raw Luau stack values at a given call level to inspect in-flight locals and temporaries, aiding debugging of running functions.

Instructions

Read the raw values currently sitting on the Luau stack at a given call level via the executor's debug.getstack. Without 'index' it returns every live stack slot at that level as an encoded list (Instances/EnumItems/tables are flattened to a JSON-friendly shape); with 'index' it returns just that one slot's encoded value. This exposes the in-flight locals and temporaries of a running function — the values a frame is actively working with — letting you snapshot what a callback or hooked function holds at the moment your code runs. Requires debug.getstack — type-guarded and pcall-wrapped, returning { error } when missing or on failure. Returns { level, index?, value } / { level, count, values } or { error }. Signature: { level: number, index: number?, threadContext: number?, timeoutMs: number? }. Phase: observe; cost=medium; idempotency=read-only. Requires: active-client. 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
indexNoOptional 1-based stack slot index. When given, only that single slot is read and returned; when omitted, the whole stack table at 'level' is returned.
levelYesThe call-stack level to read (1 = the function calling getstack, i.e. the executing chunk; higher = further up the stack).
timeoutMsNoOptional per-call deadline in milliseconds; omit it to use the tool or server default.
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
Behavior4/5

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

Annotations already declare read-only/idempotent/non-destructive, but the description adds real behavioral detail beyond them: it is type-guarded and pcall-wrapped, returns { error } when debug.getstack is missing or the call fails, and documents the encoded/flattened output shape. Cost=medium and Requires: active-client are also surfaced.

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 core behavior and modes, then structured metadata (Phase/cost/Requires/Produces/Safety/failure pointer). It is dense for a 4-param tool and restates the full signature, which duplicates the schema, but every block still earns its place given the absence of an output schema.

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 carries the return contract ({ level, index?, value } / { level, count, values } / { error }), documents the failure mode, prerequisite (active-client), and cost. Nothing an agent needs to call it correctly 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 the schema already documents all four parameters and the baseline is 3. The description adds value by explaining the observable effect of 'index' on output (whole-level encoded list vs. single slot's encoded value) and framing 'level' as in-flight locals/temporaries, which is more than the schema states.

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 (read) and resource (raw values on the Luau stack at a call level), names the underlying API debug.getstack, and distinguishes the two operating modes (whole-level list vs. single indexed slot). An agent can immediately tell this apart from introspection siblings such as get-call-stack or dump-function-env.

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 context for when this applies — 'snapshot what a callback or hooked function holds at the moment your code runs' — but names no explicit alternatives or exclusions against siblings like get-thread-stack or get-call-stack. Clear context without routing guidance, so a 4.

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