Skip to main content
Glama

read_script

Read a Roblox Studio script's source code by path, optionally limiting output to a start/end line range with numbered lines and total line count.

Instructions

Read source code of a script by path. Pass startLine/endLine to read only a range (returns numbered lines and totalLines).

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "path": "<path>"
    },
    "name": "read_script"
  }
}

Input Schema

NameRequiredDescriptionDefault
pathYesPath to the script
clientNoTarget a specific Studio client by name (as shown on the panel, e.g. "studio"). Omit to auto-pick: the only active client, or the most recently active one when several are connected.
endLineNoLast line to read (inclusive, optional)
startLineNoFirst line to read (1-based, optional)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A3.5/5.0
Behavior3/5

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

With no annotations, the description must carry the behavioral load. 'Read' clearly implies a non-mutating operation and it discloses the return shape (numbered lines and totalLines), which is useful. It does not mention the client auto-pick behavior, error cases for a bad path, or any size/truncation limits, so gaps remain.

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?

Two tight sentences with the primary action front-loaded and the optional range behavior in a clear parenthetical. No filler, though the return-value note is compact enough that the description still reads cleanly.

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 simple read tool with full schema coverage and four parameters, the description covers the core action and the optional range mode. The absence of an output schema means a little more return-detail could help, but the essentials an agent needs are present.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

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

Schema description coverage is 100%, so path, client, startLine, and endLine are already documented in the schema. The description reinforces the range parameters but adds no syntax or format detail beyond what the schema states, so the baseline 3 applies.

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 and resource: 'Read source code of a script by path.' That distinguishes it from search_scripts, check_script, and read_workspace well enough for an agent to pick it. It does not explicitly name a sibling or contrast behavior, which keeps it below a 5.

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?

The description implies use when you need a script's source and explains the range-reading case via startLine/endLine. It gives no explicit when-not guidance or alternative routing against read_workspace or search_scripts, leaving selection partly to inference.

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