create_script
Create a new GDScript file in a Godot project. Optionally set the base class, global class name, or provide the full script content.
Instructions
Create a new GDScript file. Optionally specify extends, class_name, and body.
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": {
"projectPath": "<projectPath>",
"scriptPath": "<scriptPath>"
},
"name": "create_script"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| projectPath | Yes | Path to the Godot project directory | |
| scriptPath | Yes | Path for the new .gd file (relative to project) | |
| extends | No | Base class to extend (default Node) | |
| className | No | Optional class_name to register globally | |
| content | No | Full script content. If provided, extends/className are ignored. | |
| overwrite | No | Overwrite if the file already exists (default false) |