Skip to main content
Glama

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
NameRequiredDescriptionDefault
pathYesPath to the shader file

Implementation Reference

  • 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}`
        }]
      };
    }
  • 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 });
    }

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