Skip to main content
Glama

show_mutant

Display code differences and mutation details for a specific mutant in Python projects using mutmut show to analyze test coverage and identify untested code paths.

Instructions

Show the code diff and details for a specific mutant using mutmut show. Args: mutation_id (str): The ID of the mutant to show. venv_path (Optional[str]): Path to the virtual environment, if any. Returns: str: The output of 'mutmut show <mutation_id>'.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
mutation_idYes
venv_pathNo

Implementation Reference

  • The 'show_mutant' tool handler function in mutmut_mcp.py which executes 'mutmut show <mutation_id>'.
    def show_mutant(mutation_id: str, venv_path: Optional[str] = None) -> str:
        """
        Show the code diff and details for a specific mutant using mutmut show.
        Args:
            mutation_id (str): The ID of the mutant to show.
            venv_path (Optional[str]): Path to the virtual environment, if any.
        Returns:
            str: The output of 'mutmut show <mutation_id>'.
        """
        if not mutation_id:
            return "Error: mutation_id is required."
        return _run_mutmut_cli(["show", mutation_id], venv_path)
  • mutmut_mcp.py:187-187 (registration)
    Registration of the 'show_mutant' tool with the MCP server.
    mcp.tool()(show_mutant)

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