query_codebase_graph
Query an existing AST knowledge graph to inspect symbol definitions, trace dependencies, identify god classes, or examine clusters without loading large source files.
Instructions
Traverses and queries an existing 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 inside graphify-out/ without mutations, network calls, or authentication. Prerequisite: requires an active graph generated via build_codebase_graph; if no graph exists, returns an actionable notice directing the caller to build it.
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 to check general graph health or existence (use inspect_codebase_graph), and do not use to construct the graph (use build_codebase_graph). Returns: Structured architectural intelligence matching the query mode: summary statistics, ranked god classes by centrality, top connected dependencies, or matched symbol occurrences.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "query_codebase_graph"
}
}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. |