get_current_mode
Retrieve the current operational mode from the MCP server with SSH support to access centralized system information efficiently.
Instructions
Gets information about the current mode
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/server/tools/ModeTools.ts:98-128 (handler)The handler function that implements the core logic of the 'get_current_mode' tool. It retrieves the current mode state from the ModeManager and returns a formatted text response with mode name, memory bank status, and UMB status./** * Handles the get_current_mode tool * @param memoryBankManager Memory Bank Manager * @returns Operation result */ export function handleGetCurrentMode(memoryBankManager: MemoryBankManager) { const modeManager = memoryBankManager.getModeManager(); if (!modeManager) { return { content: [ { type: 'text', text: 'Mode manager not initialized.', }, ], isError: true, }; } const modeState = modeManager.getCurrentModeState(); return { content: [ { type: 'text', text: `Current mode: ${modeState.name}\nMemory Bank status: ${modeState.memoryBankStatus}\nUMB mode active: ${modeState.isUmbActive ? 'Yes' : 'No'}`, }, ], }; }
- src/server/tools/ModeTools.ts:22-28 (schema)The schema definition for the 'get_current_mode' tool, specifying the name, description, and input schema (no input parameters required).name: 'get_current_mode', description: 'Gets information about the current mode', inputSchema: { type: 'object', properties: {}, }, },
- src/server/tools/index.ts:30-38 (registration)Registration of the tool list handler, which includes the modeTools array containing the 'get_current_mode' schema for the list_tools MCP request.server.setRequestHandler(ListToolsRequestSchema, async () => ({ tools: [ ...coreTools, ...progressTools, ...contextTools, ...decisionTools, ...modeTools, ], }));
- src/server/tools/index.ts:261-263 (registration)Dispatch registration in the CallToolRequestSchema handler: routes calls to 'get_current_mode' to the handleGetCurrentMode function.case 'get_current_mode': { return handleGetCurrentMode(memoryBankManager); }