script-create
Creates new GDScript files with optional templates for singleton, state machine, component, or resource patterns to generate game logic scripts.
Instructions
[compact alias of create_script] Creates a new GDScript (.gd) file with optional templates. Use to generate scripts for game logic. Templates: "singleton" (autoload), "state_machine" (FSM), "component" (modular), "resource" (custom Resource).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| projectPath | Yes | Absolute path to project directory containing project.godot. Use the same path across all tool calls in a workflow. | |
| scriptPath | Yes | Path for new script relative to project (e.g., "scripts/player.gd", "autoload/game_manager.gd") | |
| className | No | Optional: class_name for global access (e.g., "Player", "GameManager") | |
| extends | No | Base class to extend (e.g., "Node", "CharacterBody2D", "Resource"). Default: "Node" | |
| content | No | Optional: initial script content to add after class declaration | |
| template | No | Optional: template name - "singleton", "state_machine", "component", "resource" | |
| reason | No | Optional reason/context for this change. Displayed in visualizer audit timeline. |