codebase_graph_visualize
Visualize code dependency graphs with Mermaid text or interactive HTML, highlighting circular dependencies and enabling blast-radius exploration.
Instructions
Visualise the code dependency graph. Two modes: • mode="mermaid" (default) — returns a Mermaid diagram (text) colour-coded by language, circular deps highlighted. Best for inline rendering inside chat, GitHub, or editors that render Mermaid. • mode="interactive" — writes a self-contained HTML page (vendored Cytoscape.js + Dagre, works offline) and opens it in the user's default browser. Shows the file graph and, when a symbol graph is available and fits, a Symbols toggle with the symbol-level call graph. Interactions: click node for sidebar with imports/dependents/symbols list; right-click node to highlight its blast radius (reverse-transitive closure); live search; layout switcher (Dagre / force / concentric / breadth-first / grid / circle); PNG export. Use this when the user asks for a visual/interactive view, wants to explore visually, or needs a shareable diagram.
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": "codebase_graph_visualize"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mode | No | "mermaid" (default — text diagram) or "interactive" (browser-based explorer). | |
| open | No | In interactive mode, whether to auto-open the browser. Default true. Set false to just get the file path (useful in headless environments). | |
| projectPath | No | Absolute path to the project directory. |