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

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)

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