Skip to main content
Glama

codebase_graph_visualize

Visualize code dependency graphs with color-coded Mermaid diagrams or an interactive browser explorer. Supports circular dependency highlighting, symbol graphs, and blast radius analysis.

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.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
modeNo"mermaid" (default — text diagram) or "interactive" (browser-based explorer).
openNoIn interactive mode, whether to auto-open the browser. Default true. Set false to just get the file path (useful in headless environments).
projectPathNoAbsolute path to the project directory.
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries full burden. It thoroughly discloses behavioral traits: color-coding, circular dependency highlighting, browser auto-open, headless fallback, interactive features like click/right-click actions, and layout switchers. No contradictions.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is well-structured with two paragraphs and bullet points for modes. It is front-loaded with the main purpose. Every sentence adds value, though some interactive details could be more concise.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the complexity of the tool (two modes, many interactive features) and no output schema, the description fully covers return values (Mermaid string, HTML file path) and key interactive behaviors. It is complete for an agent to select and invoke correctly.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100% with descriptions for all 3 parameters. The description adds value by clarifying default mode and the effect of the `open` parameter (e.g., headless use), which goes beyond the schema's minimal descriptions.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states it visualizes the code dependency graph and explicitly distinguishes two modes with specific outputs (Mermaid text vs interactive HTML). This differentiates it from sibling tools like codebase_graph_stats or codebase_graph_query.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides clear guidance on when to use each mode: mermaid for inline rendering, interactive for visual exploration. It implies context of use but does not explicitly exclude scenarios or contrast with alternatives like codebase_graph_query.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/giancarloerra/SocratiCode'

If you have feedback or need assistance with the MCP directory API, please join our Discord server