get_mode
Retrieve detailed information about a specific mode using its unique slug, enabling precise mode management and configuration within the Modes MCP Server.
Instructions
Get details of a specific mode
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| slug | Yes | Slug of the mode to retrieve |
Implementation Reference
- src/index.ts:343-360 (handler)The handler function for the 'get_mode' tool. It extracts the slug from arguments, reads the config, finds the matching mode, and returns its JSON stringified representation or throws an error if not found.case 'get_mode': { const { slug } = request.params.arguments as { slug: string }; const config = await this.readConfig(); const mode = config.customModes.find((m) => m.slug === slug); if (!mode) { throw new McpError(ErrorCode.InvalidParams, `Mode not found: ${slug}`); } return { content: [ { type: 'text', text: JSON.stringify(mode, null, 2), }, ], }; }
- src/index.ts:184-197 (registration)Tool registration for 'get_mode' in the ListToolsRequestSchema response, including name, description, and input schema definition.{ name: 'get_mode', description: 'Get details of a specific mode', inputSchema: { type: 'object', properties: { slug: { type: 'string', description: 'Slug of the mode to retrieve', }, }, required: ['slug'], }, },
- src/index.ts:187-197 (schema)Input schema for the 'get_mode' tool, defining the required 'slug' parameter.inputSchema: { type: 'object', properties: { slug: { type: 'string', description: 'Slug of the mode to retrieve', }, }, required: ['slug'], }, },