add_node
Adds a node to an existing Godot scene, sets property values using Godot literal expressions, and optionally attaches a script.
Instructions
Add a node to an existing scene. Property values are Godot literal expressions, e.g. position: "Vector2(10, 20)", text: '"Hello"'. A script_path attaches a script to the node.
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": {
"project": "<project>",
"scene_path": "<scene_path>",
"name": "<name>",
"type": "<type>"
},
"name": "add_node"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | Node name (identifier) | |
| type | Yes | Godot class, e.g. "Sprite2D", "CollisionShape2D", "Label" | |
| parent | No | Parent path from the root; "." (default) adds it under the root | |
| project | Yes | Project folder name under the projects directory | |
| properties | No | Property name to Godot literal value | |
| scene_path | Yes | Scene path relative to the project, e.g. "scenes/level1.tscn" | |
| script_path | No | Script to attach, e.g. "scripts/player.gd" |