godot_get_node_transform
Retrieve the transform data of a node in a Godot scene file to inspect its position, rotation, and scale properties for development workflows.
Instructions
Read the transform section of a specific node in a saved scene. Currently supports Node2D, Node3D, and Control nodes.
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:1610-1650 (handler)The `GodotController.get_node_transform` method implements the tool logic, running a Godot helper script to extract node transformation data.
def get_node_transform( 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_transform.gd", user_args=[ "--scene-path", resource_scene_path, "--node-path", normalized_node_path, ], ) parsed = _parse_script_json_output(output, "get_node_transform.gd") 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"), "transform_kind": parsed.get("transform_kind"), "supported_fields": parsed.get("supported_fields", []), "transform": parsed.get("transform", {}), "godot_executable": str(executable), "godot_version": version, } - src/godot_mcp/server.py:733-765 (registration)The `godot_get_node_transform` tool is registered in the `GodotMcpServer` class with its input schema and handler.
name="godot_get_node_transform", description="Read the transform section of a specific node in a saved scene. Currently supports Node2D, Node3D, and Control nodes.", 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_transform( project_path=args["project_path"], scene_path=args["scene_path"], node_path=args.get("node_path", "."), godot_executable=args.get("godot_executable"), ), ),