Skip to main content
MCP Tools

get_blast_radius

Return the set of files that would be affected (directly or transitively) if the given file changes. Useful for understanding the impact of a change before making it.

Input schema

{
"type": "object",
"required": ["file"],
"properties": {
"file": {
"type": "string",
"description": "File to analyse, relative to repo root."
},
"max_depth": {
"type": "integer",
"default": 5,
"minimum": 1,
"maximum": 20,
"description": "Maximum reverse-BFS depth from the file."
},
"repo": {
"type": "string"
}
}
}

Output schema

{
"type": "object",
"properties": {
"file": { "type": "string" },
"direct_consumers": {
"type": "array",
"items": { "type": "string" },
"description": "Files that directly import the target file."
},
"transitive_consumers": {
"type": "array",
"items": { "type": "string" },
"description": "Files reachable via reverse BFS at depth > 1."
},
"total_affected": { "type": "integer" },
"risk_score": {
"type": "number",
"minimum": 0,
"maximum": 1,
"description": "Normalised risk score: 0 = no impact, 1 = affects everything."
}
}
}

Example

Request:

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

Response:

{
"file": "src/auth/jwt.ts",
"direct_consumers": [
"src/middleware/auth.ts",
"src/routes/login.ts",
"src/services/SessionService.ts"
],
"transitive_consumers": [
"src/routes/users.ts",
"src/routes/orders.ts",
"src/controllers/UserController.ts",
"src/controllers/OrderController.ts",
"src/app.ts"
],
"total_affected": 8,
"risk_score": 0.34
}

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.