Skip to main content
Glama

folder_create

Create new folders in Unity projects to organize assets and scripts. Specify the path to add structure to your project directory.

Instructions

Create a new folder in Unity project

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYesPath for the new folder (e.g., Assets/MyFolder)

Implementation Reference

  • The main handler for the 'folder_create' tool in the executeTool method's switch statement. It validates the required 'path' parameter, calls the adapter's createFolder method, and returns a formatted success message with the created folder's path and GUID.
    case 'folder_create': {
      if (!args.path) {
        throw new Error('path is required');
      }
      const result = await this.adapter.createFolder(args.path);
      return {
        content: [{
          type: 'text',
          text: `Folder created successfully:\nPath: ${result.path}\nGUID: ${result.guid}`
        }]
      };
    }
  • Registration of the 'folder_create' tool in the getTools() method, defining its name, description, and input schema requiring a 'path' parameter.
    {
      name: 'folder_create',
      description: 'Create a new folder in Unity project',
      inputSchema: {
        type: 'object',
        properties: {
          path: {
            type: 'string',
            description: 'Path for the new folder (e.g., Assets/MyFolder)'
          }
        },
        required: ['path']
      }
    },
  • Supporting method in UnityHttpAdapter that implements the folder creation by calling the Unity HTTP server's 'folder/create' endpoint via the generic call() method.
    async createFolder(path: string): Promise<{ path: string; guid: string }> {
      return this.call('folder/create', { 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/zabaglione/mcp-server-unity'

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