run_snapshot
Save passing test results as golden baselines to establish expected behavior after intentional changes. Updates the reference point for future regression checks.
Instructions
Run tests and save passing results as the new golden baseline. Use this to establish or update the expected behavior after an intentional change. Future run_check calls will compare against this snapshot. Call this: (1) after creating a new test with create_test, (2) after confirming a behavioral change is intentional, (3) before making large refactors so you have a clean rollback point. Only passing tests are saved — failing tests are skipped with a warning. IMPORTANT: Automatically detect test_path by looking for a 'tests/evalview/' directory in the current project. If it exists, pass it as test_path.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| test | No | Snapshot only this specific test by name (optional, snapshots all by default) | |
| notes | No | Human-readable note about why this snapshot was taken | |
| test_path | No | Path to the test directory. Auto-detect: use 'tests/evalview/' if it exists, otherwise 'tests'. |
Implementation Reference
- evalview/mcp_server.py:421-428 (handler)The run_snapshot MCP tool handler implementation in evalview/mcp_server.py, which invokes the evalview CLI tool.
elif name == "run_snapshot": test_path = os.path.normpath(args.get("test_path", self.test_path)) cmd = ["evalview", "snapshot", test_path] if args.get("test"): cmd += ["--test", args["test"]] if args.get("notes"): cmd += ["--notes", args["notes"]] - evalview/mcp_server.py:113-146 (schema)The schema definition for the run_snapshot MCP tool.
{ "name": "run_snapshot", "description": ( "Run tests and save passing results as the new golden baseline. " "Use this to establish or update the expected behavior after an intentional change. " "Future `run_check` calls will compare against this snapshot. " "Call this: (1) after creating a new test with create_test, " "(2) after confirming a behavioral change is intentional, " "(3) before making large refactors so you have a clean rollback point. " "Only passing tests are saved — failing tests are skipped with a warning. " "IMPORTANT: Automatically detect test_path by looking for a 'tests/evalview/' " "directory in the current project. If it exists, pass it as test_path." ), "inputSchema": { "type": "object", "properties": { "test": { "type": "string", "description": "Snapshot only this specific test by name (optional, snapshots all by default)", }, "notes": { "type": "string", "description": "Human-readable note about why this snapshot was taken", }, "test_path": { "type": "string", "description": ( "Path to the test directory. " "Auto-detect: use 'tests/evalview/' if it exists, otherwise 'tests'." ), }, }, }, },