Skip to main content
Glama

script_delete

Remove C# script files from Unity projects to clean up unused code and manage project structure.

Instructions

Delete a C# script from Unity project

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYesPath to the script file

Implementation Reference

  • Handler for the 'script_delete' tool. Validates the 'path' argument and calls UnityHttpAdapter.deleteScript(path) to perform the deletion, then returns success message.
    case 'script_delete': { if (!args.path) { throw new Error('path is required'); } await this.adapter.deleteScript(args.path); return { content: [{ type: 'text', text: `Script deleted successfully: ${args.path}` }] }; }
  • Schema definition and registration for the 'script_delete' tool, specifying input requirements (path: string).
    { name: 'script_delete', description: 'Delete a C# script from Unity project', inputSchema: { type: 'object', properties: { path: { type: 'string', description: 'Path to the script file' } }, required: ['path'] } },
  • Helper method in UnityHttpAdapter that implements script deletion by calling the Unity HTTP endpoint 'script/delete' with the path.
    async deleteScript(path: string): Promise<any> { return this.call('script/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