get_script_source
Retrieve the source code of a script object (LocalScript, Script, or ModuleScript) by specifying the instance path using the MCP server in Roblox Studio. Enables direct access to script data for development and debugging purposes.
Instructions
Get the source code of a script object (LocalScript, Script, or ModuleScript)
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": {
"instancePath": "<instancePath>"
},
"name": "get_script_source"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| instancePath | Yes | Path to the script instance (e.g., "game.ServerScriptService.MainScript") |