query_codebase_graph
Traverses and searches a codebase AST graph to inspect symbol definitions, trace dependencies, identify god classes, and examine functional clusters without loading massive source files.
Instructions
Traverses and searches the codebase AST knowledge graph to inspect symbol definitions, identify architectural god classes, trace dependencies, or examine functional clusters. Safe, read-only query: performs local file reads without mutations, network calls, or authentication. If the AST graph has not been precomputed (graphify-out/ missing), safely executes a non-failing structural fallback scan of top directories and code files with instructions to run graphify.
When to use: Call during codebase onboarding, architectural review, or refactoring to retrieve targeted structural relationships without loading massive source files. When NOT to use: Do not use if you only need high-level graph health or existence; call get_graphify_status instead. Returns: Structured architectural intelligence matching the query mode: summary statistics, ranked god classes by centrality, top connected dependencies, or matched symbol occurrences.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| query | No | Target symbol name (class, function, file) or operational keyword: 'summary' (overall metrics), 'god_nodes' (classes with highest centrality/complexity), 'dependencies' (top connected modules), or 'communities' (cluster breakdown). Case-insensitive. Defaults to 'summary'. | summary |
| repo_path | No | Absolute or relative path to the target repository root containing graphify-out/. If omitted, empty string, or '.', queries the current working directory. |