roblox_script_edit
Replace the first occurrence of a text string inside a Roblox Luau script, enabling targeted code edits through a Studio bridge without rewriting the whole file.
Instructions
Replace first occurrence of old_string in a script.
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": {
"instance_path": "<instance_path>",
"old_string": "<old_string>",
"new_string": "<new_string>"
},
"name": "roblox_script_edit"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| new_string | Yes | ||
| old_string | Yes | ||
| start_line | No | ||
| instance_path | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |