Skip to main content
Glama

folder_rename

Rename folders in Unity projects to organize assets and maintain project structure. Specify the current folder path and new name to update references automatically.

Instructions

Rename a folder in Unity project

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
oldPathYesCurrent path of the folder
newNameYesNew name for the folder

Implementation Reference

  • Registers the 'folder_rename' tool including its name, description, and input schema in the getTools() method.
    {
      name: 'folder_rename',
      description: 'Rename a folder in Unity project',
      inputSchema: {
        type: 'object',
        properties: {
          oldPath: {
            type: 'string',
            description: 'Current path of the folder'
          },
          newName: {
            type: 'string',
            description: 'New name for the folder'
          }
        },
        required: ['oldPath', 'newName']
      }
    },
  • Handler for 'folder_rename' tool in executeTool method. Validates inputs and delegates to UnityHttpAdapter.renameFolder, then formats success response.
    case 'folder_rename': {
      if (!args.oldPath || !args.newName) {
        throw new Error('oldPath and newName are required');
      }
      const result = await this.adapter.renameFolder(args.oldPath, args.newName);
      return {
        content: [{
          type: 'text',
          text: `Folder renamed successfully:\nOld Path: ${result.oldPath}\nNew Path: ${result.newPath}\nGUID: ${result.guid}`
        }]
      };
    }
  • Core implementation of folder rename via HTTP POST to Unity MCP server endpoint 'folder/rename'.
    async renameFolder(oldPath: string, newName: string): Promise<{ oldPath: string; newPath: string; guid: string }> {
      return this.call('folder/rename', { oldPath, newName });
    }

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