list_tests
Discover test files matching .test.* and .spec.* patterns recursively. Get structured file info with absolute and relative paths to understand test organization and coverage. Optionally limit search to a specific directory.
Instructions
Discover and catalog test files across the project with support for common test file patterns (.test., .spec.). Recursively searches directories and provides structured file information including paths and relative locations. Useful for understanding test organization and coverage scope. Requires set_project_root to be called first.
USE WHEN: User wants to explore test structure, find test files, understand test organization, or asks "what tests exist", "show me test files", or mentions exploring/finding tests. Also use when "vitest-mcp:" prefix is included and context involves test discovery.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | No | Optional directory path to search for test files. Can be relative (e.g., "./src/components") or absolute. If not provided, searches the entire project root. Useful for limiting search scope to specific directories or modules. |