Skip to main content
Glama

get_project_files

Read-only

Discover a Godot project's file tree when paths are unknown. List the whole project or one subfolder, filter by file extensions.

Instructions

Return the file tree of a Godot project. Use to discover project structure when paths are unknown. subfolder lists one folder as the root (maxDepth counts from it). extensions filters files (e.g. ["gd","tscn"]) and drops directories with no match; maxDepth -1 is unlimited. Skips dot-prefixed entries. Returns: the root node { name, type, path, children[] }; a child is a file, a directory, or a link (not followed). A directory not opened or unreadable has children null; warnings leads then.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "projectPath": "<projectPath>"
    },
    "name": "get_project_files"
  }
}

Input Schema

NameRequiredDescriptionDefault
maxDepthNoMaximum recursion depth, counted from the listed root. -1 means unlimited (default: -1)
subfolderNoFolder inside the project to list instead of the whole project (e.g. "ui/themes" or "res://ui"). Must exist and be a directory. Omit for the project root.
extensionsNoFilter to only these file extensions (e.g. ["gd", "tscn"]); directories with no match are left out. Omit to include all.
projectPathYesPath to the Godot project directory

Output Schema

NameRequiredDescriptionDefault
nameYes
pathYesProject-relative path; "." for the root.
typeYes
childrenNoDirectories only. Each child has this same shape. Null when the directory was not opened (maxDepth) or could not be read.
warningsNoRoot node only: depth cuts, unreadable paths and links that were not followed.
extensionNoFiles only, lower case, no dot.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed4 schema fields changedv4.0.1
    • changedInput schema / properties / extensions / description
      Previous value: -"Filter to only these file extensions (e.g. [\"gd\", \"tscn\"]). Omit to include all."New value: +"Filter to only these file extensions (e.g. [\"gd\", \"tscn\"]); directories with no match are left out. Omit to include all."
    • changedInput schema / properties / maxDepth / description
      Previous value: -"Maximum recursion depth. -1 means unlimited (default: -1)"New value: +"Maximum recursion depth, counted from the listed root. -1 means unlimited (default: -1)"
    • addedInput schema / properties / subfolder
      Added value: +{
      +  "description": "Folder inside the project to list instead of the whole project (e.g. \"ui/themes\" or \"res://ui\"). Must exist and be a directory. Omit for the project root.",
      +  "type": "string"
      +}
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "properties": {
      +    "children": {
      +      "description": "Directories only. Each child has this same shape. Null when the directory was not opened (maxDepth) or could not be read.",
      +      "items": {
      +        "type": "object"
      +      },
      +      "type": [
      +        "array",
      +        "null"
      +      ]
      +    },
      +    "extension": {
      +      "description": "Files only, lower case, no dot.",
      +      "type": "string"
      +    },
      +    "name": {
      +      "type": "string"
      +    },
      +    "path": {
      +      "description": "Project-relative path; \".\" for the root.",
      +      "type": "string"
      +    },
      +    "type": {
      +      "enum": [
      +        "file",
      +        "dir",
      +        "link"
      +      ],
      +      "type": "string"
      +    },
      +    "warnings": {
      +      "description": "Root node only: depth cuts, unreadable paths and links that were not followed.",
      +      "items": {
      +        "type": "string"
      +      },
      +      "type": "array"
      +    }
      +  },
      +  "required": [
      +    "name",
      +    "type",
      +    "path"
      +  ],
      +  "type": "object"
      +}
  2. Addedv3.1.1
  3. Removedv3.0.0
  4. Addedv1.0.0

TDQS

A3.9/5.0
Behavior4/5

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

Beyond readOnlyHint=true, the description discloses real behavioral detail: dot-prefixed entries are skipped, links are reported but not followed, unopened or unreadable directories carry children null, and warnings are emitted first. That is substantial added context. The only gap is that it doesn't say how links are represented or how large trees behave (truncation/pagination).

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

Conciseness4/5

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

Front-loaded with purpose, then behavior, then return shape; no filler sentences. A few fragments are terse to the point of ambiguity, notably "warnings leads then", which reads like a note rather than a sentence.

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

Completeness4/5

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

An output schema exists, yet the description still adds the parts an agent needs to interpret it — null children meaning, link nodes not followed, warnings ordering. For a read-only listing tool this is close to complete; only truncation/size behavior on very large trees is unaddressed.

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?

With schema coverage at 100%, the schema already documents all four parameters, so the baseline applies. The description does add one genuinely new relationship the schema does not state — that maxDepth counts from the subfolder root rather than the project root — but the rest (extensions filtering, -1 unlimited, dot-file skipping) restates schema text.

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?

"Return the file tree of a Godot project" states a specific verb and resource, and the follow-up clause scopes it to path discovery. It is clearly not a scene-tree or search tool, though it never names the sibling it displaces (e.g. search_project) to make the boundary explicit.

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

Usage Guidelines4/5

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

"Use to discover project structure when paths are unknown" gives a concrete triggering condition, which is more than most definitions offer. It stops short of stating when to prefer an alternative such as search_project or get_scene_tree, so there is no exclusion guidance.

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