Skip to main content
Glama

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

Implementation Reference

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

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