godot_get_node_properties
Retrieve property lists and serialized values from specific nodes in Godot scene files to inspect and analyze node configurations.
Instructions
Return the current property list and serialized values for a specific node in a saved scene.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| project_path | Yes | Path to the Godot project directory or its project.godot file. | |
| scene_path | Yes | Path to the target .tscn file. Absolute, relative, and res:// paths are supported. | |
| node_path | No | Scene-relative node path to inspect. Use '.' for the root node. | . |
| godot_executable | No | Optional explicit path to the Godot executable or .app bundle. |
Implementation Reference
- src/godot_mcp/godot.py:1566-1608 (handler)The GodotController class implements the handler for `godot_get_node_properties`, which uses a helper script to inspect node properties in a scene file.
def get_node_properties( self, project_path: str, scene_path: str, node_path: str = ".", godot_executable: str | None = None, ) -> dict[str, Any]: project_dir = ensure_project_path(project_path) executable, version = resolve_godot_executable(godot_executable) absolute_scene_path, resource_scene_path = resolve_scene_path(project_dir, scene_path) if not absolute_scene_path.exists(): raise GodotError(f"Scene not found: {absolute_scene_path}") normalized_node_path = normalize_scene_node_path(node_path) output = _run_godot_script( executable=executable, project_dir=project_dir, script_name="get_node_properties.gd", user_args=[ "--scene-path", resource_scene_path, "--node-path", normalized_node_path, ], ) parsed = _parse_script_json_output(output, "get_node_properties.gd") properties = parsed.get("properties", []) if not isinstance(properties, list): raise GodotError("Node property inspection did not return a property list.") return { "project_path": str(project_dir), "scene_path": str(absolute_scene_path), "scene_resource_path": resource_scene_path, "node_path": parsed.get("node_path", normalized_node_path), "node_name": parsed.get("node_name"), "node_type": parsed.get("node_type"), "property_count": int(parsed.get("property_count", len(properties))), "properties": properties, "godot_executable": str(executable), "godot_version": version, } - src/godot_mcp/server.py:698-731 (registration)Registration of the `godot_get_node_properties` tool in the server class.
ToolDefinition( name="godot_get_node_properties", description="Return the current property list and serialized values for a specific node in a saved scene.", input_schema={ "type": "object", "properties": { "project_path": { "type": "string", "description": "Path to the Godot project directory or its project.godot file.", }, "scene_path": { "type": "string", "description": "Path to the target .tscn file. Absolute, relative, and res:// paths are supported.", }, "node_path": { "type": "string", "description": "Scene-relative node path to inspect. Use '.' for the root node.", "default": ".", }, "godot_executable": { "type": "string", "description": "Optional explicit path to the Godot executable or .app bundle.", }, }, "required": ["project_path", "scene_path"], "additionalProperties": False, }, handler=lambda args: self.controller.get_node_properties( project_path=args["project_path"], scene_path=args["scene_path"], node_path=args.get("node_path", "."), godot_executable=args.get("godot_executable"), ), ),