create_script
Generate a new GDScript file in a Godot project from a template or inline content, with optional overwrite support for existing scripts.
Instructions
Create a new GDScript file in the project from a template or inline content
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>",
"filePath": "<filePath>"
},
"name": "create_script"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| content | No | Optional full file content (overrides template, max 100KB) | |
| filePath | Yes | Script path relative to project, e.g. scripts/player.gd | |
| template | No | Optional template: empty|Node|Node2D|Node3D|CharacterBody2D|autoload (defaults to Node) | |
| overwrite | No | Allow overwriting an existing file (defaults to false) | |
| projectPath | Yes | Path to the Godot project directory |