delete_mode
Remove a custom mode by specifying its unique slug, enabling streamlined mode management and configuration in Modes MCP Server.
Instructions
Delete a custom mode
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| slug | Yes | Slug of the mode to delete |
Implementation Reference
- src/index.ts:435-455 (handler)Handler for the 'delete_mode' tool. It reads the configuration, finds the mode by slug, removes it from the array, writes the updated config back to file, and returns a success message. Throws InvalidParams if mode not found.case 'delete_mode': { const { slug } = request.params.arguments as { slug: string }; const config = await this.readConfig(); const index = config.customModes.findIndex((m) => m.slug === slug); if (index === -1) { throw new McpError(ErrorCode.InvalidParams, `Mode not found: ${slug}`); } config.customModes.splice(index, 1); await this.writeConfig(config); return { content: [ { type: 'text', text: `Mode "${slug}" deleted successfully`, }, ], }; }
- src/index.ts:291-305 (registration)Registration of the 'delete_mode' tool in the ListTools response, defining its name, description, and input schema requiring a 'slug' parameter.{ name: 'delete_mode', description: 'Delete a custom mode', inputSchema: { type: 'object', properties: { slug: { type: 'string', description: 'Slug of the mode to delete', }, }, required: ['slug'], }, }, {
- src/index.ts:294-303 (schema)Input schema definition for the 'delete_mode' tool, specifying an object with a required 'slug' string.inputSchema: { type: 'object', properties: { slug: { type: 'string', description: 'Slug of the mode to delete', }, }, required: ['slug'], },