create_gdscript
Create GDScript files in a Godot project, optionally generating starter scripts or movement examples for CharacterBody2D and CharacterBody3D nodes.
Instructions
Create a GDScript file inside a Godot project. If content is omitted, generate a starter script; CharacterBody2D and CharacterBody3D get working movement examples.
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_gdscript"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| content | No | Optional complete GDScript source. An extends declaration is added when missing and must match baseClass when present. | |
| baseClass | No | Godot base class, for example Node, CharacterBody2D, Area2D, or CharacterBody3D. | Node |
| overwrite | No | Replace an existing file. Defaults to false. | |
| scriptPath | Yes | Path to the new .gd file relative to projectPath. | |
| projectPath | Yes | Absolute path to a directory containing project.godot. |