Skip to main content
Glama

godot_create_scene

Create and save new Godot scenes with normalized filenames, specifying root node types and project paths for organized game development.

Instructions

Create and save a new scene with a normalized Godot-style filename and root node name.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
project_pathYesPath to the Godot project directory or its project.godot file.
scene_nameYesHuman-friendly scene name, for example 'Main Menu'.
root_typeNoGodot node type for the scene root, such as Node2D, Control, or Node3D.Node2D
folderNoProject-relative folder where the scene should be saved.scenes
set_as_main_sceneNoWhether to update the project so this scene becomes the main scene.
overwriteNoWhether to replace an existing scene file with the same normalized name.
godot_executableNoOptional explicit path to the Godot executable or .app bundle.

Implementation Reference

  • The `create_scene` method in `GodotController` executes the logic to create and save a new scene in a Godot project by calling a helper script `create_scene.gd`.
    def create_scene(
        self,
        project_path: str,
        scene_name: str,
        root_type: str = "Node2D",
        folder: str = "scenes",
        set_as_main_scene: bool = False,
        overwrite: bool = False,
        godot_executable: str | None = None,
    ) -> dict[str, Any]:
        project_dir = ensure_project_path(project_path)
        executable, version = resolve_godot_executable(godot_executable)
    
        if not scene_name.strip():
            raise GodotError("`scene_name` is required.")
    
        normalized_folder = normalize_project_subdir(folder)
        scene_dir = project_dir / normalized_folder if normalized_folder else project_dir
        scene_dir.mkdir(parents=True, exist_ok=True)
    
        filename = f"{snake_case_name(scene_name)}.tscn"
        absolute_scene_path = (scene_dir / filename).resolve()
        if absolute_scene_path.exists() and not overwrite:
            raise GodotError(f"Scene already exists at {absolute_scene_path}. Pass `overwrite=true` to replace it.")
    
        relative_scene_path = absolute_scene_path.relative_to(project_dir)
        resource_scene_path = f"res://{relative_scene_path.as_posix()}"
        root_name = pascal_case_name(scene_name)
    
        _run_godot_script(
            executable=executable,
            project_dir=project_dir,
            script_name="create_scene.gd",
            user_args=[
                "--scene-path",
                resource_scene_path,
                "--root-type",
                root_type,
                "--root-name",
                root_name,
                "--set-main-scene",
                "true" if set_as_main_scene else "false",
            ],
        )
    
        return {
            "project_path": str(project_dir),
            "scene_name": scene_name,
            "scene_path": str(absolute_scene_path),
            "scene_resource_path": resource_scene_path,
            "scene_root_name": root_name,
            "root_type": root_type,
            "set_as_main_scene": set_as_main_scene,
            "godot_executable": str(executable),
            "godot_version": version,
        }
  • The `godot_create_scene` tool is registered in `GodotMcpServer` with its description, input schema, and handler.
        name="godot_create_scene",
        description="Create and save a new scene with a normalized Godot-style filename and root node name.",
        input_schema={
            "type": "object",
            "properties": {
                "project_path": {
                    "type": "string",
                    "description": "Path to the Godot project directory or its project.godot file.",
                },
                "scene_name": {
                    "type": "string",
                    "description": "Human-friendly scene name, for example 'Main Menu'.",
                },
                "root_type": {
                    "type": "string",
                    "description": "Godot node type for the scene root, such as Node2D, Control, or Node3D.",
                    "default": "Node2D",
                },
                "folder": {
                    "type": "string",
                    "description": "Project-relative folder where the scene should be saved.",
                    "default": "scenes",
                },
                "set_as_main_scene": {
                    "type": "boolean",
                    "description": "Whether to update the project so this scene becomes the main scene.",
                    "default": False,
                },
                "overwrite": {
                    "type": "boolean",
                    "description": "Whether to replace an existing scene file with the same normalized name.",
                    "default": False,
                },
                "godot_executable": {
                    "type": "string",
                    "description": "Optional explicit path to the Godot executable or .app bundle.",
                },
            },
            "required": ["project_path", "scene_name"],
            "additionalProperties": False,
        },
        handler=lambda args: self.controller.create_scene(
            project_path=args["project_path"],
            scene_name=args["scene_name"],
            root_type=args.get("root_type", "Node2D"),
            folder=args.get("folder", "scenes"),
            set_as_main_scene=bool(args.get("set_as_main_scene", False)),
            overwrite=bool(args.get("overwrite", False)),
            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 full burden but only states what the tool does, not how it behaves. It doesn't disclose important behavioral traits like whether this requires Godot installation, what happens with invalid inputs, whether it validates the project structure, or what happens when set_as_main_scene=true. The description doesn't contradict annotations (none exist), but provides minimal behavioral 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?

Single sentence, front-loaded with the core action, zero waste. Every word earns its place by specifying creation, saving, and the two key characteristics (filename normalization and root node naming).

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?

For a 7-parameter creation tool with no annotations and no output schema, the description is minimally adequate. It states what the tool does but lacks important context about behavioral characteristics, error handling, and what constitutes successful execution. Given the complexity (scene creation with multiple configuration options), more completeness would be expected.

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 already documents all 7 parameters thoroughly. The description adds minimal value beyond the schema - it mentions 'normalized Godot-style filename' which relates to scene_name parameter processing, but doesn't explain what 'normalized' means or provide additional parameter context. Baseline 3 is appropriate when schema does the heavy lifting.

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

Purpose5/5

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

The description clearly states the specific action ('Create and save a new scene') and specifies key characteristics ('normalized Godot-style filename and root node name'). It distinguishes itself from siblings like godot_edit_scene (editing existing) and godot_create_project (project-level creation) by focusing on scene creation with specific formatting requirements.

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?

The description implies usage when creating new Godot scenes with proper naming conventions, but doesn't explicitly state when to use this versus alternatives like godot_create_project for project creation or godot_edit_scene for modifying existing scenes. No explicit exclusions or prerequisites 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