Skip to main content
Glama

folder_rename

Rename folders within Unity projects using direct input of current path and new name, streamlining asset management and organization.

Instructions

Rename a folder in Unity project

Input Schema

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

Implementation Reference

  • Tool registration including name, description, and input schema for folder_rename
    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'] } },
  • Main handler logic for executing the folder_rename tool: validates parameters and delegates to UnityHttpAdapter
    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}` }] }; }
  • Adapter helper method that performs the HTTP call to Unity server for renaming a folder
    async renameFolder(oldPath: string, newName: string): Promise<{ oldPath: string; newPath: string; guid: string }> { return this.call('folder/rename', { oldPath, newName }); }

Other Tools

Related 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