add_node
Add a child node to a Godot scene file on disk. Specify node type, name, and optional properties; parent path defaults to root.
Instructions
Add a child node to a scene file on disk. Defaults to root if parentNodePath is omitted. For sub-scene instances, use instantiate_scene.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| nodeName | Yes | Name for the new node | |
| nodeType | Yes | Type of node to add (e.g., Sprite2D, CollisionShape2D) | |
| scenePath | Yes | Path to the scene file (relative to project) | |
| properties | No | Optional properties to set on the node | |
| projectPath | Yes | Path to the Godot project directory | |
| parentNodePath | No | Path to the parent node (e.g., "root" or "root/Player") |