generate_test_command
Generates the optimal test command for Jest, Vitest, or Playwright from changed files, reducing test suite runs to only affected tests.
Instructions
Outputs the optimal test execution command for Jest, Vitest, or Playwright based on changed files.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"project_root": "<project_root>",
"changed_files": "<changed_files>"
},
"name": "generate_test_command"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| runner | No | Test runner to target | vitest |
| project_root | Yes | Absolute path to the TypeScript project root (must contain tsconfig.json) | |
| changed_files | Yes | List of modified source file paths |