Skip to main content
Glama

clear_settings

Clear all settings and cached data from the code-index-mcp server to reset configurations and remove stored information.

Instructions

Clear all settings and cached data.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • MCP tool handler for 'clear_settings', registered via @mcp.tool() decorator. Delegates to SettingsService.clear_all_settings() for execution.
    @mcp.tool()
    @handle_mcp_tool_errors(return_type='str')
    def clear_settings(ctx: Context) -> str:
        """Clear all settings and cached data."""
        return SettingsService(ctx).clear_all_settings()
  • Core implementation logic for clearing settings, called by the clear_settings handler.
    def clear_all_settings(self) -> str:
        """
        Clear all settings and cached data.
    
        Handles the logic for clear_settings MCP tool.
    
        Returns:
            Success message confirming settings were cleared
        """
        if self.settings:
            self.settings.clear()
    
        return "Project settings, index, and cache have been cleared."
Behavior2/5

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

No annotations are provided, so the description carries full burden. It states the action ('clear') but doesn't disclose critical behavioral traits such as whether this operation is reversible, requires specific permissions, affects system performance, or has side effects on other tools. For a destructive operation with zero annotation coverage, this is a significant gap.

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 zero wasted words. It's appropriately sized and front-loaded, directly stating the tool's purpose without unnecessary elaboration.

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

Completeness3/5

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

Given the tool's complexity (destructive operation with no parameters), the description is minimally adequate but lacks depth. It states what the tool does but doesn't cover behavioral aspects, usage context, or output details. The presence of an output schema helps, but for a tool that clears data, more guidance is needed to be fully complete.

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 with 100% schema description coverage, so the schema fully documents the lack of inputs. The description doesn't need to add parameter details, and it correctly implies no parameters are required, earning a baseline score above 3 for this scenario.

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 ('clear') and the target ('all settings and cached data'), providing a specific verb+resource combination. However, it doesn't differentiate from sibling tools like 'get_settings_info' or 'configure_file_watcher', which prevents a perfect score.

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?

The description offers no guidance on when to use this tool versus alternatives, prerequisites, or consequences. Given sibling tools like 'get_settings_info' and 'configure_file_watcher', users need explicit direction on when clearing is appropriate versus checking or modifying settings.

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

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/johnhuang316/code-index-mcp'

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