Skip to main content
Glama
EL4CTEO

Roblox Studio MCP

Viewport and selection

viewport
Idempotent

Select instances, aim or set the Studio camera, raycast the world, audit UI layout, and measure rendered text to verify builds in Roblox Studio.

Instructions

Works with the 3D view and the Studio selection.

select sets, extends or shrinks what is highlighted in Studio. Select what you just built or changed — it shows the user the result, and puts the instance under Studio's own move and scale handles. studio_status reports the current selection; this sets it.

focus aims the Studio camera at an instance and frames it so the whole thing is on screen. This is what makes screenshot worth having: a picture of wherever the camera happened to be answers nothing, while a picture of the thing you just built answers 'does it look right', which no amount of reading properties can. Build, focus, screenshot.

The distance is computed from the subject's size and the camera's field of view, so a doorway and a whole map both arrive filling a similar share of the frame. from changes the angle you view it from, and padding how tightly it is framed.

camera sets or reads the camera directly, for shots framing cannot express — standing inside a room, or looking along a corridor.

raycast fires a ray through the world and reports the first thing it hits, with position, surface normal, distance and material. This answers 'what occupies this space', which the data model alone cannot: use it to find the ground under a spawn point, or check whether a gap is clear before placing something.

ui audits a whole interface for the faults that are invisible in the data model: elements off the side of the screen, elements covering each other, zero-size elements, text too small to read, and text that overflows its label. A button positioned off a phone screen has a perfectly correct Position and Size — nothing about the instance is wrong, it is just somewhere nobody can reach.

It measures against whatever device is currently emulating, so the way to use it is twice: once as-is, then device op="set" a phone and again. Layout is live in edit mode — no playtest needed.

textbounds measures how big a piece of text actually renders. Point it at a TextLabel, TextButton or TextBox with path and it reads that label's own text, font, size and width and answers whether the text fits inside it. Give text and size directly and it just measures. There is no other honest way to answer 'will this label overflow' — character counts ignore the font, and font size is not a width.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
atNofocus only: look at this point instead of an instance, e.g. "0, 10, 0".
opYes'focus' points the camera at something and frames it, 'camera' sets it explicitly, 'select' changes the Studio selection, 'textbounds' measures rendered text, 'raycast' queries the world.
fontNotextbounds only: an Enum.Font name, e.g. "GothamMedium". Defaults to the label's.
fromNofocus only: direction to view from, e.g. "0, 1, 0" for directly above or "1, 0, 0" from the side. Defaults to a raised three-quarter view.
modeNoselect only: replace the selection, extend it, or remove from it.set
pathNofocus only: the instance to look at. A model, part, or folder containing them.
textNotextbounds only: the string to measure. Defaults to the label's own text.
pathsNoselect only: instances to select. An empty array clears the selection.
ignoreNoraycast only: instances the ray passes through.
lookAtNocamera only: the point to aim at.
originNoraycast only: where the ray starts, e.g. "0, 50, 0".
paddingNofocus only: how much room to leave around the subject. 1 is tight.
positionNocamera only: where to put the camera, e.g. "0, 20, 30".
richTextNotextbounds only: treat the text as rich text. Defaults to the label's setting.
studioIdNoTarget Studio; omit for the active one.
textSizeNotextbounds only: font size in pixels. Defaults to the label's.
directionNoraycast only: which way it points, e.g. "0, -1, 0" for straight down.
wrapWidthNotextbounds only: wrap at this width. 0 means do not wrap. Defaults to the label's width.
fieldOfViewNocamera only: field of view in degrees. Lower is more zoomed in.
maxDistanceNoraycast only: how far to look, in studs.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.6.5
    • changedInput schema / properties / op / enum
      Previous value: -[
      -  "select",
      -  "raycast",
      -  "focus",
      -  "camera",
      -  "textbounds"
      -]New value: +[
      +  "select",
      +  "raycast",
      +  "focus",
      +  "camera",
      +  "textbounds",
      +  "ui"
      +]
  2. Changed7 schema fields changedv0.4.5
    • addedInput schema / properties / font
      Added value: +{
      +  "description": "textbounds only: an Enum.Font name, e.g. \"GothamMedium\". Defaults to the label's.",
      +  "type": "string"
      +}
    • changedInput schema / properties / op / description
      Previous value: -"'focus' points the camera at something and frames it, 'camera' sets it explicitly, 'select' changes the Studio selection, 'raycast' queries the world."New value: +"'focus' points the camera at something and frames it, 'camera' sets it explicitly, 'select' changes the Studio selection, 'textbounds' measures rendered text, 'raycast' queries the world."
    • changedInput schema / properties / op / enum
      Previous value: -[
      -  "select",
      -  "raycast",
      -  "focus",
      -  "camera"
      -]New value: +[
      +  "select",
      +  "raycast",
      +  "focus",
      +  "camera",
      +  "textbounds"
      +]
    • addedInput schema / properties / richText
      Added value: +{
      +  "description": "textbounds only: treat the text as rich text. Defaults to the label's setting.",
      +  "type": "boolean"
      +}
    • addedInput schema / properties / text
      Added value: +{
      +  "description": "textbounds only: the string to measure. Defaults to the label's own text.",
      +  "type": "string"
      +}
    • addedInput schema / properties / textSize
      Added value: +{
      +  "description": "textbounds only: font size in pixels. Defaults to the label's.",
      +  "maximum": 200,
      +  "minimum": 1,
      +  "type": "number"
      +}
    • addedInput schema / properties / wrapWidth
      Added value: +{
      +  "description": "textbounds only: wrap at this width. 0 means do not wrap. Defaults to the label's width.",
      +  "minimum": 0,
      +  "type": "number"
      +}
  3. First observedv0.1.8

TDQS

A4.5/5.0
Behavior4/5

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

Annotations cover the safety profile (readOnlyHint=false, destructiveHint=false, idempotentHint=true), and the description adds genuinely new behavioral context: layout is live in edit mode with no playtest needed, distance is computed from subject size and FOV, and each query op's return shape (position/normal/distance/material for raycast). It does not state which ops mutate Studio state vs. only read, which annotations leave fuzzy at the whole-tool level.

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?

Organized op-by-op with lead sentences per capability, so it is scannable despite its length. It is on the verbose side and includes editorializing ('which no amount of reading properties can', 'answers nothing'), which is justified for a broad multi-op tool but not uniformly earning its place.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a 6-op, 20-param tool with no output schema, the description is thorough: it explains what raycast, ui, and textbounds return and what select/focus/camera change. The one gap is that select/camera return values are never characterized, but given the query ops are documented, completeness is strong.

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 description coverage is 100%, so the baseline is 3, but the prose adds conceptual meaning beyond the per-parameter strings: how focus computes distance and frames both a doorway and a whole map similarly, that `at` substitutes for an instance, that ui measures against the current `device`, and that textbounds falls back to the label's own text/font/size when fields are omitted.

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 names each of the six ops with a concrete verb+resource: 'select sets/extends/shrinks the Studio selection', 'focus aims the camera', 'raycast fires a ray', 'ui audits an interface', 'textbounds measures rendered text'. It explicitly distinguishes itself from siblings ('studio_status reports the current selection; this sets it'), so an agent can route without opening the schema.

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?

Nearly every op carries a when-to-use: 'select what you just built or changed', 'build, focus, screenshot', 'use ui... twice: once as-is, then device op="set" a phone and again'. It names the related tools (screenshot, device, studio_status) and the condition that selects each, leaving little to inference.

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