script_write
Replaces a Roblox Studio script's entire source and creates the script plus any missing parent folders when needed; changes are undoable.
Instructions
Replace a script's whole source, creating the script (and missing parent Folders) if needed. Undoable.
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>",
"source": "<source>"
},
"name": "script_write"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | ||
| class | No | Class when creating. Default ModuleScript. | |
| source | Yes | ||
| studio | No | Optional. Target Studio (name substring, place id or id). Only needed when several Studios are open and none was selected. | |
| run_context | No | Optional RunContext when creating a Script. |