Skip to main content
Glama

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

Implementation Reference

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

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