Skip to main content
Glama

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
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • 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'}`, }, ], }; }
  • 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: {}, }, },
  • 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, ], }));
  • Dispatch registration in the CallToolRequestSchema handler: routes calls to 'get_current_mode' to the handleGetCurrentMode function.
    case 'get_current_mode': { return handleGetCurrentMode(memoryBankManager); }

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/aakarsh-sasi/memory-bank-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server