add_to_group
Add a node to a named group, enabling group-based node queries like get_nodes_in_group() in Godot.
Instructions
Add a node to a group. Groups are essential for get_tree().get_nodes_in_group("enemies") pattern.
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>",
"nodePath": "<nodePath>",
"groupName": "<groupName>"
},
"name": "add_to_group"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| projectPath | Yes | Path to the Godot project directory | |
| scenePath | Yes | Scene file path | |
| nodePath | Yes | Path to the node (e.g. root/Player) | |
| groupName | Yes | Name of the group (e.g. enemies, collectibles) |