Skip to main content
Glama
roblox-studio
by nardjay

Read script source

get_script_source
Read-onlyIdempotent

Read the full source code of any Roblox Script, LocalScript, or ModuleScript by instance path, with 1-based line numbers for precise debugging and editing.

Instructions

Read the full Source of a Script, LocalScript or ModuleScript. Line numbers are 1-based in the returned text.

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": "get_script_source"
  }
}

Input Schema

NameRequiredDescriptionDefault
pathYesInstance path. Accepts "Workspace.Model.Part", "game.Workspace.Model.Part" or "game.Workspace[\"My Part\"].Model". Use "game" or omit for the DataModel root.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A3.7/5.0
Behavior3/5

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

Annotations already declare readOnly, idempotent, non-destructive and closed-world, so the safety profile is covered. The description adds one useful behavioral detail — line numbers are 1-based in the returned text — but says nothing about truncation limits on large scripts or how non-script instances are handled.

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 short sentences, front-loaded with the action and resource, with the line-number note as a secondary detail. No filler, though the second sentence is a formatting note that could arguably live in a return-value doc.

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 single-parameter read tool with full schema coverage and readOnly annotations, the definition covers what is read, which instance types it applies to, and the indexing convention. It lacks only edge-case behavior (large sources, non-script paths), which is a minor gap.

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% and the path parameter already documents its accepted formats, root shorthand, and quoting style. The description adds no path semantics beyond the schema, so the baseline of 3 applies.

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?

States a specific verb (Read) and resource (Source of a Script, LocalScript or ModuleScript), and names the exact script types it applies to. It is clearly distinguishable from siblings like set_script_source and edit_script, which write rather than read.

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 verb 'Read' and the readOnly annotations imply when to use it, and the contrast with set_script_source/edit_script is apparent from their names. However, the description never explicitly says 'use this to inspect source before editing' or excludes non-script instances, so guidance is only implied.

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