create_script
Save supplied Lua code to a relative .lua file under the MCP project’s scripts/ folder, creating parent folders and replacing existing files atomically.
Instructions
Save supplied Lua code to a file relative to the MCP project root's scripts/ folder. Inputs: file_name (required string, relative .lua path such as examples/reward.lua); code (required string, complete Lua source). Effects: creates parent folders and atomically replaces an existing file without a backup; trailing whitespace is removed and one final newline is written. Does not validate or upload. Returns: relative file_name, absolute path, and bytes written.
Context: Choose for a quick file under the MCP root. For a user-supplied directory use create_directory_script; for a named managed project use create_project_script; for a supported starter prompt use make_script. Validate with validate_script before uploading. An existing watcher may upload a saved file if its glob includes it.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| code | Yes | ||
| file_name | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||