Skip to main content
Glama

visualize_graph

Idempotent

Open an interactive HTML graph of file or symbol dependencies in the browser. Supports force, hierarchical, and radial layouts with community coloring.

Instructions

Open interactive HTML graph in browser showing file/symbol dependencies. Supports force/hierarchical/radial layouts, community coloring. Use granularity=symbol to see individual functions/classes/methods as nodes instead of files. Writes an HTML file to disk. For static Mermaid/DOT output use get_dependency_diagram instead. Returns JSON: { outputPath, nodes, edges }.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
scopeYesScope: file path, directory (e.g. "src/"), or "project"
depthNoMax hops from scope (default 2)
layoutNoGraph layout algorithm (default force)
color_byNoNode coloring strategy (default community)
include_edgesNoFilter edge types (default: all)
outputNoOutput file path (default: /tmp/trace-mcp-graph.html)
hide_isolatedNoHide nodes with no edges (default: true — removes disconnected ring)
granularityNoNode granularity: file (default) or symbol (functions/classes/methods)
symbol_kindsNoFilter symbol kinds when granularity=symbol (e.g. ["function","class","method"])
max_filesNoMax seed files for file-level graph (default 10000)
max_nodesNoMax viz nodes for symbol-level graph (default 100000)
include_bottlenecksNoAnnotate edges with bottleneckScore/isBridge and nodes with isArticulation (file granularity only). Default false.
Behavior5/5

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

Discloses that it writes an HTML file to disk, opens in browser, and returns JSON with outputPath, nodes, edges. Adds context beyond annotations (idempotentHint, destructiveHint) by describing side effects and output format.

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

Conciseness5/5

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

Three sentences: purpose with feature highlights, key parameter guidance, alternative tool, and return format. No waste, front-loaded with main action.

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?

For a 12-param tool with 100% schema coverage, the description covers core use case, key parameter (granularity), sibling differentiation, and return format. No missing context for an agent to decide invocation.

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 covers all parameters with descriptions. Description adds extra context for granularity (symbol-level) and output format, which helps beyond the schema.

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?

Clearly states it opens an interactive HTML graph in browser for file/symbol dependencies. Describes layouts, community coloring, and distinguishes from sibling get_dependency_diagram for static output.

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?

Provides explicit guidance: use for interactive graphs, use get_dependency_diagram for static Mermaid/DOT output. Also mentions granularity=symbol for symbol-level. Could more specifically contrast with other graph tools like get_import_graph.

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/nikolai-vysotskyi/trace-mcp'

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