shader_delete
Remove unwanted shaders from Unity projects by specifying the file path, streamlining asset management and project cleanup.
Instructions
Delete a shader from Unity project
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | Path to the shader file |
Implementation Reference
- src/tools/unity-mcp-tools.ts:406-417 (handler)Handler for the shader_delete tool. Validates the 'path' argument and delegates deletion to the UnityHttpAdapter's deleteShader method, returning success message.case 'shader_delete': { if (!args.path) { throw new Error('path is required'); } await this.adapter.deleteShader(args.path); return { content: [{ type: 'text', text: `Shader deleted successfully: ${args.path}` }] }; }
- src/tools/unity-mcp-tools.ts:179-192 (registration)Tool registration in getTools() method, defining the name, description, and input schema for shader_delete.{ name: 'shader_delete', description: 'Delete a shader from Unity project', inputSchema: { type: 'object', properties: { path: { type: 'string', description: 'Path to the shader file' } }, required: ['path'] } },
- Helper method in UnityHttpAdapter that performs the HTTP call to the Unity server to delete the shader using the 'shader/delete' endpoint.async deleteShader(path: string): Promise<any> { return this.call('shader/delete', { path }); }