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.
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>",
"scenePath": "<scenePath>",
"nodeType": "<nodeType>",
"nodeName": "<nodeName>"
},
"name": "add_node"
}
}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") |