get_affected_tests
Determine which tests to run after a code change by analyzing the import graph to find affected test files from your changed source files.
Instructions
Given a list of changed source files, returns which test files are affected — directly or transitively through the import graph. Use to answer: which tests should I run after this code change?
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>"
},
"name": "get_affected_tests"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| git_diff | No | Raw output of `git diff --name-only` — newline-separated file paths. Use instead of changed_files when piping git output directly. | |
| project_root | Yes | Absolute path to the TypeScript project root (must contain tsconfig.json) | |
| changed_files | No | List of changed file paths (absolute or relative to project_root) |