edit_directory_script
Apply deterministic edits to a Roblox BedWars Creative Lua script, replacing, appending, or prepending code, then return a unified diff with atomic writes and backups.
Instructions
Apply a deterministic edit to an outside project script and return a unified diff.
Context: Use replace old with new, replace: old => new, append: code, prepend: code, or a fenced Lua block. Unsupported instructions fail without changes. Changed files are written atomically and retain a .bak backup; no-op edits preserve the existing backup.
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": {
"directory": "<directory>",
"file_name": "<file_name>",
"instructions": "<instructions>"
},
"name": "edit_directory_script"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| sync | No | ||
| directory | Yes | ||
| file_name | Yes | ||
| instructions | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||