create_project_script
Saves Lua code as a named file in a project, choosing sync or drafts folder, for Roblox BedWars Creative scripting.
Instructions
Save supplied Lua code in a named MCP-managed project under scripts/projects/. Inputs: project_name (required string, a project name rather than a directory path); file_name (required string, relative .lua path inside the chosen section); code (required string, Lua source); sync (optional boolean, default true: choose sync/; false: choose drafts/). Effects: creates parent folders and atomically replaces the file without a backup; does not prepare project metadata, validate, or directly upload. Returns: project_name, project-relative file_name, absolute path, sync selection, and bytes.
Context: Choose for a project identified by name. Use create_project first if its brief, manifest, and starter main.lua are needed. sync is a folder selector, not an upload action. For an arbitrary directory use create_directory_script. To upload this layout, connect the project directory with glob_pattern='sync//*.lua'; the usual scripts//*.lua glob does not select sync/. An existing matching watcher may upload the saved file.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| code | Yes | ||
| sync | No | ||
| file_name | Yes | ||
| project_name | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||