Skip to main content
Glama

folder_list

List files and subdirectories within Unity project folders to manage assets and navigate project structure. Specify a path and choose recursive listing for comprehensive directory exploration.

Instructions

List contents of a folder in Unity project

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathNoPath of the folder to list (default: Assets)
recursiveNoList all subdirectories recursively (default: false)

Implementation Reference

  • Handler for the 'folder_list' tool. Calls the adapter's listFolder method with provided path and recursive parameters, then formats the directory entries with icons (📁 for folders, 📄 for files) and path information, returning a formatted text response.
    case 'folder_list': {
      const result = await this.adapter.listFolder(args.path, args.recursive);
      const entries = result.entries.map(e => {
        const prefix = e.type === 'folder' ? '📁' : '📄';
        const info = e.type === 'file' ? ` (${e.extension})` : '';
        return `${prefix} ${e.name}${info} - ${e.path}`;
      }).join('\n');
      
      return {
        content: [{
          type: 'text',
          text: `Contents of ${result.path}:\n\n${entries || '(empty)'}`
        }]
      };
    }
  • Registration of the 'folder_list' tool in the getTools() method, including name, description, and input schema definition.
    {
      name: 'folder_list',
      description: 'List contents of a folder in Unity project',
      inputSchema: {
        type: 'object',
        properties: {
          path: {
            type: 'string',
            description: 'Path of the folder to list (default: Assets)'
          },
          recursive: {
            type: 'boolean',
            description: 'List all subdirectories recursively (default: false)'
          }
        }
      }
    }
  • Input schema for the folder_list tool defining parameters: path (string, optional, default Assets) and recursive (boolean, optional, default false).
      inputSchema: {
        type: 'object',
        properties: {
          path: {
            type: 'string',
            description: 'Path of the folder to list (default: Assets)'
          },
          recursive: {
            type: 'boolean',
            description: 'List all subdirectories recursively (default: false)'
          }
        }
      }
    }
  • Helper method in UnityHttpAdapter that implements listFolder by making an HTTP POST call to Unity server endpoint 'folder/list' with path and recursive parameters.
    async listFolder(path?: string, recursive: boolean = false): Promise<{ path: string; entries: FolderEntry[] }> {
      return this.call('folder/list', { path, recursive });
    }
  • Type definition for FolderEntry used in listFolder response, defining structure of directory listing entries.
    export interface FolderEntry {
      path: string;
      name: string;
      type: 'file' | 'folder';
      extension?: string;
      guid: string;
    }
Behavior2/5

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

No annotations are provided, so the description carries full burden. It states it's a listing operation (implied read-only), but doesn't disclose important behavioral traits like whether it requires specific permissions, how it handles non-existent paths, what format the output takes, or any rate limits. For a tool with no annotation coverage, this leaves significant gaps in understanding its behavior.

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 a single, efficient sentence that communicates the core purpose without unnecessary words. It's appropriately sized for a simple listing tool and front-loads the essential information. Every word earns its place.

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 the tool's moderate complexity (listing operation with 2 parameters), no annotations, and no output schema, the description is minimally adequate but incomplete. It covers the basic purpose but lacks important context about behavior, output format, and usage guidelines. For a tool with siblings that might overlap in functionality, more guidance would be helpful.

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 fully documents both parameters (path and recursive). The description doesn't add any parameter-specific information beyond what's in the schema. According to scoring rules, when schema coverage is high (>80%), the baseline is 3 even with no param info in description.

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 verb ('List') and resource ('contents of a folder in Unity project'), making the purpose immediately understandable. It distinguishes from siblings like folder_create or folder_delete by focusing on listing rather than modification. However, it doesn't explicitly differentiate from project_info or project_status which might also provide listing functionality.

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

Usage Guidelines2/5

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

The description provides no guidance on when to use this tool versus alternatives. With siblings like project_info and project_status that might provide overlapping functionality, there's no indication of when folder_list is preferred. No prerequisites, exclusions, or comparison to other tools 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/zabaglione/mcp-server-unity'

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