Skip to main content
Glama

codebase_graph_visualize

Visualize code dependency graphs with a color-coded Mermaid diagram or an interactive browser explorer that supports search, layout switching, and PNG export.

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
projectPathNoAbsolute path to the project directory.
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).
Behavior5/5

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

No annotations exist, so the description fully carries the behavioral burden. It details what each mode does, including that interactive mode writes an HTML file and opens the browser, with configurable auto-open. No destructive behaviors are implied.

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 bullet points for modes and clear sentence flow. It is informative but not overly verbose; every sentence adds necessary detail. Slight room for tighter phrasing.

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

Completeness3/5

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

The description lacks explicit mention of what the tool returns as output (e.g., text diagram vs file path). Since there is no output schema, this gap reduces completeness. Interaction details are thorough, but return value behavior is omitted.

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%, but the description adds significant value beyond the schema: it explains the difference between mermaid and interactive modes, and clarifies the 'open' parameter's default and headless use. This enriches parameter understanding.

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 the tool visualizes the code dependency graph and explains two distinct modes. It distinguishes itself from sibling tools like codebase_graph_build and codebase_graph_query by focusing on visualization, not building or querying.

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 explicit usage guidance for each mode: mermaid for inline rendering, interactive for visual exploration. It does not mention when to avoid this tool or use specific siblings, but the mode-specific advice is clear.

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