delete_mode
Remove a custom operational mode from the Modes MCP Server by specifying its slug to manage configurations.
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: extracts slug, reads config, removes the matching mode, persists changes, and returns success message or error if 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-304 (registration)Tool registration in list_tools handler: defines name, description, and input schema for delete_mode.{ 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 validation for delete_mode tool: requires a string 'slug' parameter.inputSchema: { type: 'object', properties: { slug: { type: 'string', description: 'Slug of the mode to delete', }, }, required: ['slug'], },