Skip to main content
Glama
EL4CTEO

Roblox Studio MCP

Read scripts

script_read
Read-onlyIdempotent

Read Luau code from Roblox Studio's live buffer with line numbers, so edits target the current unsaved source. Fetch full scripts or selected line ranges to avoid stale saved data.

Instructions

Reads Luau source from one or more scripts, with line numbers that script_edit accepts back verbatim.

Source comes from the Studio script editor's live buffer, so anything the user has typed but not yet saved is included. Reading the saved property instead would hand you stale code and you would 'fix' the change they just made.

Pass every script you need in one call, including when you want a different part of each: an entry may be a bare path for the whole file, or {path, startLine, endLine} for a window into that one script. The top-level startLine/endLine are the default for entries that do not carry their own.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathsYesScripts to read, e.g. ["ServerScriptService.Systems.Combat"] or [{ path: "...Combat", startLine: 120, endLine: 180 }].
endLineNoDefault last line for entries without their own, inclusive. Omit to read to the end.
studioIdNoTarget Studio; omit for the active one.
startLineNoDefault first line for entries without their own, 1-based and inclusive. Omit to start at the top.

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. Changed5 schema fields changedv0.3.0
    • changedInput schema / properties / endLine / description
      Previous value: -"Last line to return, inclusive. Omit to read to the end."New value: +"Default last line for entries without their own, inclusive. Omit to read to the end."
    • changedInput schema / properties / paths / description
      Previous value: -"Script paths, e.g. [\"ServerScriptService.Systems.Combat\"]."New value: +"Scripts to read, e.g. [\"ServerScriptService.Systems.Combat\"] or [{ path: \"...Combat\", startLine: 120, endLine: 180 }]."
    • addedInput schema / properties / paths / items / anyOf
      Added value: +[
      +  {
      +    "description": "A script path, read in full.",
      +    "type": "string"
      +  },
      +  {
      +    "properties": {
      +      "endLine": {
      +        "description": "Last line of the window for this script, inclusive.",
      +        "maximum": 9007199254740991,
      +        "minimum": 1,
      +        "type": "integer"
      +      },
      +      "path": {
      +        "description": "The script to read.",
      +        "type": "string"
      +      },
      +      "startLine": {
      +        "description": "First line of the window for this script, 1-based and inclusive.",
      +        "maximum": 9007199254740991,
      +        "minimum": 1,
      +        "type": "integer"
      +      }
      +    },
      +    "required": [
      +      "path"
      +    ],
      +    "type": "object"
      +  }
      +]
    • removedInput schema / properties / paths / items / type
      Removed value: -"string"
    • changedInput schema / properties / startLine / description
      Previous value: -"First line to return, 1-based and inclusive. Omit to start at the top."New value: +"Default first line for entries without their own, 1-based and inclusive. Omit to start at the top."
  2. First observedv0.1.8

TDQS

A4.6/5.0
Behavior5/5

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

Annotations already indicate read-only, open-world, idempotent, and non-destructive behavior. The description adds valuable behavioral context beyond that: it reads from the Studio editor's live buffer, includes unsaved user edits, and produces line numbers intended for script_edit. This is exactly the kind of non-obvious behavior an agent needs to know.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is tight and well-structured: first sentence states what it does, second explains the live-buffer rationale, third explains batching and windowing. Every sentence adds useful information with no filler, and front-loads the core purpose.

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?

The description covers the tool's behavior, input forms, line-number semantics, and rationale thoroughly. Without an output schema, it does not explicitly describe the exact return format, but 'source with line numbers' plus compatibility with script_edit gives a reasonably clear picture. Minor gap only.

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 each parameter. The description adds meaning by explaining the relationship between top-level startLine/endLine defaults and per-entry windows, and by describing the bare-path versus {path, startLine, endLine} forms. This goes beyond the raw schema definitions.

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 opens with 'Reads Luau source from one or more scripts', which is a specific verb and resource. It also ties to script_edit by noting line numbers are accepted back verbatim, helping an agent understand this is the read counterpart to script_edit rather than a search or write tool.

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?

It gives strong usage context: pass every script needed in one call, use the live buffer rather than saved property to avoid stale code, and use per-entry or top-level line ranges. It does not explicitly contrast against script_grep or other sibling tools, but it clearly communicates when and why to use this tool.

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

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