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
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | Path to the script | |
| client | No | Target 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. | |
| endLine | No | Last line to read (inclusive, optional) | |
| startLine | No | First line to read (1-based, optional) |