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
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/index.ts:424-439 (handler)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)}`); }
- src/config/ConfigManager.ts:247-250 (helper)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: {}, }, },
- src/index.ts:215-219 (schema)Input schema definition for the reset_config tool: empty object since no parameters are required.inputSchema: { type: 'object', properties: {}, }, },