Skip to main content
← MCP Tools

get_blast_radius

Return the set of files transitively affected if the given file changes. Useful for understanding the impact of a change before making it.

It works at file or package level, so treat it as a completeness check, not a reading list. For one function's use sites, call get_callers or find_references.

Availability: single-repo stdio (travsr mcp), global stdio (travsr mcp --global), and SSE (travsr serve).

Input schema​

{
"type": "object",
"required": ["file"],
"properties": {
"file": {
"type": "string",
"description": "Repo-relative file path to compute blast radius for"
},
"analysis": {
"type": "string",
"enum": ["tree-sitter", "semantic"],
"description": "Edge mode: 'tree-sitter' (default, structural) or 'semantic' (call/reference edges; needs full cross-file analysis to be built)."
},
"max_files": {
"type": "integer",
"minimum": 0,
"description": "Most files to list (default 500; 0 also means the default). A cut list keeps the files nearest the change and ends with a note."
},
"repo": {
"type": "string",
"description": "Repo name (run repos_list to discover). Only present in global (multi-repo) sessions."
}
},
"additionalProperties": false
}

There is no max_depth parameter (the traversal runs to a fixed internal node ceiling, not a caller-tunable depth) and no risk_score.

Output format​

Plain text: the affected file paths, one per line, sorted alphabetically. There is no direct/transitive split and no count field; every reachable file lands in the same flat list, and the target file itself is always one of the lines (it counts as affected by its own change). At most max_files files are listed (500 by default). When the list is cut it keeps the files nearest the change and ends with [note: showing the N files nearest the change; more are affected, raise max_files for more]. An empty response means file did not resolve to anything indexed at all, not "nothing depends on this": once the file resolves, its own path is always at least one line, even with zero dependents. In semantic mode a single-line result (just the file itself) can also mean call-edge analysis has not resolved anything for it yet, which is worth checking with get_lang_status before reading it as "nothing depends on this".

Example​

Request:

{ "file": "src/auth/jwt.ts" }

Response:

src/app.ts
src/auth/jwt.ts
src/controllers/OrderController.ts
src/controllers/UserController.ts
src/middleware/auth.ts
src/routes/login.ts
src/routes/orders.ts
src/routes/users.ts
src/services/SessionService.ts

Loose paths and Rust modules​

file should be a repo-relative file path. If nothing is stored at that path, the tool falls back to a name search, computes the radius of the files that search matched, and says so in a trailing [note: no file is stored at '...'; this is the radius of the N file(s) a name search for it matched: ...]. It names at most 10 of those files, and says when the search stopped at its symbol limit so other matching files could be missing.

For a Rust mod x; line, the module is stored only parent to child, so the dependents of the child file are not reached. The response names the child modules (at most 10) so you know to query them too.

When to use​

  • Before refactoring a shared utility: understand how many files you'll need to update or test.
  • Change review: a reviewer can call get_blast_radius to understand a PR's true scope.
  • Security auditing: check that a security-sensitive file (e.g. crypto utilities) has a small blast radius.

Notes​

  • analysis: "semantic" reports impact through resolved call/reference edges rather than raw imports; it needs full cross-file analysis to have run for the file's language, and undercounts silently rather than erroring when that analysis is only partial. Cross-check with get_lang_status if a semantic result looks smaller than expected.
  • On a very large fan-in (tens of thousands of nodes), the traversal stops at an internal safety ceiling and logs a warning server-side; the returned list is not marked as incomplete in that case, so treat an unusually large result with the same caution you would treat any BFS ceiling.
  • The VS Code Blast Radius panel shows N+ when the list was cut at max_files.