---
description: CodeGraph MCP usage guide — when to use which tool
alwaysApply: true
---
<!-- CODEGRAPH_START -->
## CodeGraph

This project has CodeGraph exposed through MCP. Use CodeGraph for structural questions: definitions, callers, callees, impact, signatures and focused task context. Use literal search only for exact strings, comments, logs or after a specific file is already open.

| Question | Tool |
|---|---|
| "Where is X defined?" | `codegraph_search` |
| "How does this area work?" | `codegraph_context` |
| "What calls Y?" | `codegraph_callers` |
| "What does Y call?" | `codegraph_callees` |
| "What would changing Z break?" | `codegraph_impact` |
| "Show source for related symbols" | `codegraph_explore` |
| "Is the index healthy?" | `codegraph_status` |

If the MCP server reports that CodeGraph is not initialized, ask before running `codegraph init -i`.
<!-- CODEGRAPH_END -->
