Skip to main content
Glama

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
NameRequiredDescriptionDefault
project_pathYesPath to the Godot project directory or its project.godot file.
scene_pathYesPath to the target .tscn file. Absolute, relative, and res:// paths are supported.
node_pathNoScene-relative node path to inspect. Use '.' for the root node..
godot_executableNoOptional explicit path to the Godot executable or .app bundle.

Implementation Reference

  • 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,
        }
  • 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"),
        ),
    ),
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of behavioral disclosure. It states the tool reads data (implying non-destructive, read-only behavior) and specifies supported node types, which adds some context. However, it lacks details on permissions, error handling, performance, or output format (e.g., what the transform data looks like), leaving gaps for a mutation-adjacent tool in a development context.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is two concise sentences with zero waste: the first states the core purpose and scope, and the second adds crucial constraint information (supported node types). It's front-loaded with the primary action and efficiently covers necessary details without redundancy.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given no annotations and no output schema, the description is moderately complete for a read operation: it specifies the action, target, and supported types. However, it lacks details on return values (critical without an output schema), error cases, or integration with sibling tools, leaving the agent to infer behavior in a complex toolset. This is adequate but has clear gaps.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the schema fully documents all four parameters (project_path, scene_path, node_path, godot_executable). The description adds no parameter-specific information beyond what's in the schema, such as examples or constraints on node_path for supported types. This meets the baseline for high schema coverage but doesn't enhance understanding.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('Read the transform section') and target ('a specific node in a saved scene'), with specificity about supported node types (Node2D, Node3D, Control). It distinguishes from siblings like 'godot_get_node_properties' (which reads properties generally) and 'godot_update_node_transform' (which modifies transforms). However, it doesn't explicitly contrast with these siblings in the text itself, preventing a perfect score.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Usage is implied by the description's focus on reading transforms for specific node types in saved scenes, suggesting it's for inspection rather than modification. However, there's no explicit guidance on when to use this versus alternatives like 'godot_get_node_properties' for other properties or 'godot_get_scene_tree' for broader scene data. No prerequisites or exclusions are mentioned.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/MhrnMhrn/godot-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server