Skip to main content
Glama

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
NameRequiredDescriptionDefault
slugYesSlug of the mode to delete

Implementation Reference

  • 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'], }, }, {
  • 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'], },

Other Tools

Related Tools

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/ccc0168/modes-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server