Skip to main content
Glama

read_script

Read the Luau source code of a Script, LocalScript, or ModuleScript at a specified instance path to inspect and edit Roblox Studio scripts.

Instructions

Read the Luau Source of a Script, LocalScript, or ModuleScript at the given instance path.

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
pathYes

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A3.6/5.0
Behavior3/5

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

No annotations are supplied, so the description carries the full disclosure burden, and it does add real value by stating the return content (Luau source) and restricting target types. It says nothing about behavior on an invalid path, on a non-script instance, in a disabled script, or about edit-vs-run mode, which are the ambiguity points for a tool like this.

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?

A single front-loaded sentence with the action first, the resource second, and the qualifying constraint last. No filler, no restatement of the tool name.

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 one-parameter read tool with an output schema covering return values, the description supplies the essentials: what is returned and which instance types are valid. Only secondary details such as path format and error behavior are absent.

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?

There is one required string parameter with 0% schema description coverage, so the description must supply meaning. Calling it an 'instance path' does tell the agent what kind of value to supply, but no path syntax or example (e.g., dot-separated Game tree path) is given, leaving format ambiguity.

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?

The description uses a specific verb ('Read') on a well-defined resource ('the Luau Source') and enumerates exactly which instance classes qualify (Script, LocalScript, ModuleScript). That scopes it clearly apart from write_script and get_game_tree, though it never names a sibling to contrast with explicitly.

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?

Usage is implied rather than stated: an agent can infer this is the tool for inspecting script source, and the class restriction implicitly excludes non-script instances. There is no guidance on when to prefer grep_scripts (searching across many scripts) or inspect_instance instead, and no mention of prerequisites or failure conditions.

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