shader_delete
Remove shader files from Unity projects to clean up unused assets and manage project resources effectively.
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)The main handler for the 'shader_delete' MCP tool within the executeTool switch statement. Validates the 'path' argument and delegates to UnityHttpAdapter.deleteShader().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 (schema)Tool schema definition specifying the input parameters for shader_delete, included in the getTools() return array for registration.{ 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'] } },
- Implementation of deleteShader in UnityHttpAdapter that makes an HTTP POST request to the Unity MCP server endpoint 'shader/delete'.async deleteShader(path: string): Promise<any> { return this.call('shader/delete', { path }); }