get_mode
Retrieve details for a specific operational mode by providing its slug identifier. This tool enables users to access mode configurations and settings 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)Handler for the 'get_mode' tool. It extracts the slug from input arguments, reads the configuration file, finds the matching mode by slug, and returns the mode details as JSON. Throws an error if the mode is 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)Registration of the 'get_mode' tool in the list_tools response, including the tool name, description, and input schema requiring a 'slug' string.{ 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 a required 'slug' string parameter.inputSchema: { type: 'object', properties: { slug: { type: 'string', description: 'Slug of the mode to retrieve', }, }, required: ['slug'], }, },