Skip to main content
Glama
FosterG4

Code Reference Optimizer MCP Server

by FosterG4

reset_config

Restore default settings in the Code Reference Optimizer MCP Server, ensuring optimal configuration for analyzing and optimizing multi-language code context.

Instructions

Reset configuration to default values

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • Main handler function for the 'reset_config' tool. Calls ConfigManager.resetToDefaults(), updates logger config, returns success message or throws error.
    private async handleResetConfig(_args: any) { try { this.configManager.resetToDefaults(); const logCfg = this.configManager.getConfig().logging; this.logger.updateConfig({ level: logCfg.level, toFile: logCfg.enableFileLogging, filePath: logCfg.logPath }); return { content: [{ type: 'text', text: 'Configuration reset to defaults successfully', }], }; } catch (error) { this.logger.error(`reset_config failed: ${error instanceof Error ? error.message : String(error)}`); throw new McpError(ErrorCode.InternalError, `Failed to reset configuration: ${error instanceof Error ? error.message : String(error)}`); }
  • Core helper method that resets the configuration to default values by calling getDefaultConfig() and notifying change listeners.
    resetToDefaults(): void { this.config = this.getDefaultConfig(); this.notifyConfigChange(); }
  • src/index.ts:212-219 (registration)
    Tool registration in the ListTools response, including name, description, and empty input schema (no arguments required).
    { name: 'reset_config', description: 'Reset all configuration settings to their default values. Useful for troubleshooting configuration issues or returning to optimal baseline settings. This action cannot be undone and will clear all custom configuration modifications.', inputSchema: { type: 'object', properties: {}, }, },
  • Input schema definition for the reset_config tool: empty object since no parameters are required.
    inputSchema: { type: 'object', properties: {}, }, },

Other Tools

Related Tools

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/FosterG4/mcpsaver'

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