get_repo_critical_files
Identify structurally significant files in a codebase by analyzing code complexity metrics, calculating importance scores to reveal critical files for understanding system structure.
Instructions
Analyze and identify the most structurally significant files in a codebase.
Uses code complexity metrics to calculate importance scores, helping identify
files that are most critical for understanding the system's structure.
Args:
repo_path: Path/URL matching what was provided to clone_repo
files: Optional list of specific files to analyze
directories: Optional list of specific directories to analyze
limit: Maximum number of files to return (default: 50)
include_metrics: Include detailed metrics in response (default: True)
Returns:
dict: {
"status": str, # "success", "error"
"files": [{
"path": str,
"importance_score": float,
"metrics": { # Only if include_metrics=True
"total_ccn": int,
"max_ccn": int,
"function_count": int,
"nloc": int
}
}],
"total_files_analyzed": int
}
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| files | No | ||
| limit | No | ||
| branch | No | ||
| repo_path | Yes | ||
| directories | No | ||
| cache_strategy | No | shared | |
| include_metrics | No |