Skip to main content
Glama

clean_mutmut_cache

Remove cached mutation test data to ensure accurate results and free up disk space by clearing the .mutmut-cache file or using the mutmut CLI.

Instructions

Clean mutmut cache using the mutmut CLI (if available), otherwise remove .mutmut-cache file. Returns the plain text output or confirmation message.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
venv_pathNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • The clean_mutmut_cache function attempts to clear the mutmut cache using the CLI 'clean' command, falling back to manual file deletion if necessary.
    def clean_mutmut_cache(venv_path: Optional[str] = None) -> str:
        """
        Clean mutmut cache using the mutmut CLI (if available), otherwise remove .mutmut-cache file.
        Returns the plain text output or confirmation message.
        """
        # Try CLI first
        result = _run_mutmut_cli(["clean"], venv_path)
        if "Error" not in result:
            return result
        # Fallback: remove .mutmut-cache file
        try:
            if os.path.exists(MUTMUT_CACHE_PATH):
                os.remove(MUTMUT_CACHE_PATH)
                return "Mutmut cache cleared successfully."
            else:
                return "No mutmut cache found to clear."
        except Exception as e:
            return f"Failed to clear mutmut cache: {str(e)}"
  • mutmut_mcp.py:186-186 (registration)
    Registration of the clean_mutmut_cache tool with the FastMCP server.
    mcp.tool()(clean_mutmut_cache)
Behavior3/5

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

No annotations are provided, so the description carries the full burden. It discloses that the tool performs a cleanup operation (potentially destructive) and returns plain text output, but lacks details on permissions, side effects, or error handling. This is minimal but adequate for a basic tool.

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 highly concise and front-loaded, consisting of two efficient sentences that directly state the action and output without any wasted words. Every sentence adds clear value.

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

Completeness4/5

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

Given the tool's low complexity (1 optional parameter), no annotations, and the presence of an output schema (which handles return values), the description is reasonably complete. It covers the main action and output type, though it could improve by addressing parameter usage or sibling differentiation.

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

Parameters3/5

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

The input schema has 1 parameter with 0% description coverage, and the tool description does not mention or explain the 'venv_path' parameter at all. Since there is only one parameter, the baseline is 4, but the complete lack of parameter information in the description reduces it to 3, as it fails to compensate for the schema gap.

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 tool's purpose: cleaning the mutmut cache using the mutmut CLI or removing the .mutmut-cache file. It specifies the verb ('clean') and resource ('mutmut cache'), but does not explicitly differentiate from sibling tools like 'run_mutmut' or 'rerun_mutmut_on_survivor', which prevents a score of 5.

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 provides no guidance on when to use this tool versus alternatives. It mentions the mutmut CLI availability as a fallback, but does not specify scenarios, prerequisites, or exclusions relative to sibling tools, leaving usage context unclear.

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/wdm0006/mutmut-mcp'

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