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
| Name | Required | Description | Default |
|---|---|---|---|
| mutation_id | Yes | ||
| venv_path | No |
Implementation Reference
- mutmut_mcp.py:140-151 (handler)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)