folder_delete
Remove a specified folder from a Unity project, including all its contents recursively, using the MCP Server for Unity to manage project assets effectively.
Instructions
Delete a folder from Unity project
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | Path of the folder to delete | |
| recursive | No | Delete all contents recursively (default: true) |
Implementation Reference
- src/tools/unity-mcp-tools.ts:512-524 (handler)Handler for 'folder_delete' tool in executeTool switch statement. Validates input, calls adapter.deleteFolder(path, recursive), and returns success message.case 'folder_delete': { if (!args.path) { throw new Error('path is required'); } await this.adapter.deleteFolder(args.path, args.recursive); return { content: [{ type: 'text', text: `Folder deleted successfully: ${args.path}` }] }; }
- src/tools/unity-mcp-tools.ts:282-299 (schema)Tool definition including name, description, and inputSchema for 'folder_delete' in the getTools() method.{ name: 'folder_delete', description: 'Delete a folder from Unity project', inputSchema: { type: 'object', properties: { path: { type: 'string', description: 'Path of the folder to delete' }, recursive: { type: 'boolean', description: 'Delete all contents recursively (default: true)' } }, required: ['path'] } },