Skip to main content
Glama

godot_list_resources

List scripts, shaders, scenes, and textures in a Godot project or specific subfolder to manage game assets during development.

Instructions

List saved scripts, shaders, scenes, and textures in a Godot project or one of its subfolders.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
project_pathYesPath to the Godot project directory or its project.godot file.
folder_pathNoOptional absolute, relative, or res:// path for the subfolder to scan. Defaults to the project root.

Implementation Reference

  • Implementation of the list_resources tool in GodotController.
    def list_resources(
        self,
        project_path: str,
        folder_path: str | None = None,
    ) -> dict[str, Any]:
        project_dir = ensure_project_path(project_path)
        root_dir, root_resource_path = resolve_project_directory_path(project_dir, folder_path)
        categorized = _scan_project_resources(project_dir, root_dir)
        resource_counts = {
            category: len(entries)
            for category, entries in categorized.items()
        }
    
        return {
            "project_path": str(project_dir),
            "root_path": str(root_dir),
            "root_resource_path": root_resource_path,
            "resource_counts": resource_counts,
            "total_count": sum(resource_counts.values()),
            **categorized,
        }
  • Registration of the godot_list_resources tool in the GodotMcpServer.
        name="godot_list_resources",
        description="List saved scripts, shaders, scenes, and textures in a Godot project or one of its subfolders.",
        input_schema={
            "type": "object",
            "properties": {
                "project_path": {
                    "type": "string",
                    "description": "Path to the Godot project directory or its project.godot file.",
                },
                "folder_path": {
                    "type": "string",
                    "description": "Optional absolute, relative, or res:// path for the subfolder to scan. Defaults to the project root.",
                },
            },
            "required": ["project_path"],
            "additionalProperties": False,
        },
        handler=lambda args: self.controller.list_resources(
            project_path=args["project_path"],
            folder_path=args.get("folder_path"),
        ),
    ),

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