Skip to main content
Glama
EL4CTEO

Roblox Studio MCP

Breakpoints and runtime inspection

debug

Set breakpoints that capture the call stack and variables when hit, or log Luau expressions, then retrieve snapshots.

Instructions

Sets breakpoints that record the stack and variables when they are hit, then reads back what they caught.

These are tracepoints, not a step debugger. A breakpoint fires, captures the call stack and the variables in scope, and lets execution continue; op: "snapshots" returns what was captured. Studio's debugger has to decide whether to resume the instant it stops, and cannot wait for a tool call to come back with an answer, so stepping through code line by line is not possible this way — but 'what was this value when it got here' is, which is usually the actual question.

condition is a Luau expression evaluated where the breakpoint sits, so a breakpoint can fire only on the case that matters — health < 0, player.Name == "someone".

logMessage is ALSO a Luau expression, not a template string: its value is printed when the breakpoint is hit, so write "index=" .. index rather than index={index}. Prose is a syntax error and the breakpoint is skipped. The engine prints it without stopping the thread at all, which makes it the cheapest way to watch a value change on a hot path or inside a tight loop — read the lines back with console.

So the two kinds cost different things: a logMessage breakpoint never stops and gives you one line you composed in advance, while one without it stops briefly and gives you the whole frame — every local and its type, without having to guess beforehand which value would matter. Reach for the log when you know what to watch, the capture when you do not.

Only one breakpoint exists per line, so the same line cannot both log and capture.

Put the breakpoint on a line that does something. A return, an end or a bare declaration can verify and then never fire — measured, not guessed: the same breakpoint moved from return squared, tag to the assignment above it went from silent to firing on every pass. If one verifies but catches nothing, suspect the line before suspecting the condition.

Breakpoints belong to the session that holds them. Set them in the editor session BEFORE starting a playtest, since code that already ran cannot be caught retroactively.

Nothing here leaves a thread stopped waiting for you. A capture breakpoint stops for as long as it takes to read the frame and then resumes itself, so a script with one mid-loop still runs to its last line, and the user is never left with a frozen Studio to rescue.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
opYes'set' adds breakpoints, 'clear' removes one or all, 'snapshots' reads what has been captured, 'exceptions' controls breaking on errors.
lineNoclear only: which line to remove.
modeNoexceptions only: break on every error, only unhandled ones, or never. Defaults to Unhandled.
pathNoclear only: remove breakpoints from this script. Omit to clear everything.
clearNosnapshots only: discard what is returned, so the next read starts fresh.
limitNosnapshots only: how many of the most recent to return.
studioIdNoTarget Studio; omit for the active one.
breakpointsNoset only: breakpoints to add.
Behavior5/5

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

Annotations only state general hints (readOnly=false, openWorld=true, etc.). The description adds critical behavioral context: a capture breakpoint stops briefly and resumes on its own, a logMessage breakpoint never stops, only one breakpoint per line, and nothing leaves a thread stuck. It also clarifies session ownership and the inability to retroactively catch code. This far exceeds the annotation baseline and matches them without contradiction.

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?

The description is long but well-organized: an opening summary, sections on condition and logMessage, a comparison of costs, placement advice, session constraints, and a safety reassurance. Some sentences restate earlier points (e.g., 'So the two kinds cost different things'), and the anecdote about moving a breakpoint is illustrative but slightly extraneous. Overall it earns its length for a nuanced tool, but a tighter edit would slightly improve density.

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?

Given the tool's complexity and lack of an output schema, the description covers all necessary operational details: how to set, clear, read snapshots, and handle exceptions. It explains return behavior ('gives you the whole frame — every local and its type'), common pitfalls (line placement, syntax errors, session timing), and reassures that it never blocks the thread. Nothing an agent needs to know 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.

Parameters5/5

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

Although schema coverage is 100%, the description adds substantial meaning beyond simple field definitions. It clarifies that `logMessage` is a Luau expression, not a template string, providing a concrete syntax example and warning against prose. It explains `condition` evaluation in scope and gives examples. It also explains how `mode` defaults and the semantics of `clear` and `snapshots`. These details are not in the schema and are essential for correct usage.

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?

The description starts with a clear, specific statement: 'Sets breakpoints that record the stack and variables when they are hit, then reads back what they caught.' It distinguishes itself from a step debugger explicitly, and details two operational modes (log vs capture) with distinct purposes. The resource (breakpoints in scripts) and operations (set, clear, snapshots, exceptions) are unambiguous, and it differentiates from sibling tools like console and execute_luau.

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

Usage Guidelines5/5

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

The description provides explicit usage context: it explains when to use this tool versus a step debugger ('not possible this way'), when to prefer log vs capture ('Reach for the log when you know what to watch, the capture when you do not'), and directs reading log output via console. It also warns about placement (lines that do something) and timing (set before playtest). This gives an agent clear decision criteria.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/EL4CTEO/rbx-studio-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server