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: {},
      },
    },
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries full burden. It states 'reset' implies mutation, but doesn't disclose if this requires permissions, is reversible, affects other settings, or has side effects. For a mutation tool with zero annotation coverage, this is inadequate.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence with no wasted words. It's front-loaded and gets straight to the point, making it easy to parse quickly.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a mutation tool with no annotations and no output schema, the description is too sparse. It doesn't explain what 'default values' are, what gets reset, or the response format, leaving significant gaps in understanding.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The tool has 0 parameters, and schema description coverage is 100%, so no parameter documentation is needed. The description doesn't add param info, but that's fine given the baseline for zero params is 4.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('reset') and target ('configuration to default values'), making the purpose immediately understandable. It doesn't distinguish from siblings like 'update_config' or 'get_config', but it's not vague or tautological.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance is provided on when to use this tool versus alternatives like 'update_config' or 'get_config'. The description implies a destructive reset but doesn't specify prerequisites, warnings, or typical use cases.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

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