write_script
Write or overwrite GDScript files in a Godot project, creating parent directories if missing, so scripts can be added or modified directly.
Instructions
Write or overwrite a GDScript file in a Godot project. Creates parent directories if needed. Use validate_script afterward to check for syntax errors.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| content | Yes | The GDScript source code to write | |
| scriptPath | Yes | Path to the script file (relative to project, e.g., "scripts/player.gd") | |
| projectPath | Yes | Path to the Godot project directory |