Skip to content

feat: add list_project_files tool to enumerate scenes, scripts, and resources #120

Description

@fuleinist

Summary

Add a list_project_files tool that returns the project's file tree filtered by Godot-relevant types (scenes .tscn, scripts .gd, resources .tres/.res, shaders .gdshader). This gives AI agents a quick project overview without needing filesystem access.

Proposed behavior

list_project_files(pattern?: string, type?: 'scene'|'script'|'resource'|'all')
  • Default: returns all Godot-relevant files grouped by type
  • pattern: optional glob filter (e.g. "enemies/**")
  • type: filter to a single category
  • Returns: { scenes: [...], scripts: [...], resources: [...], total: N }

Why

Current tools (run_project, resave_resources, load_sprite) operate on specific files but provide no way to discover what files exist. An AI agent starting on a new project needs to understand the project layout before making changes. This is a lightweight discovery tool ??? no parsing, just file enumeration.

Implementation notes

  • Walk the project directory (respecting .godot/ ignore)
  • Filter by extension
  • Optionally parse scene files for node count / inheritance info (future enhancement)
  • Should work with both Godot 3.x and 4.x projects

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions