Skip to main content
Glama
dorkian

code-graph-mcp

by dorkian

Visualize graph slice

visualize_graph

Generate a Mermaid or Graphviz diagram for a code graph slice to visualize component hierarchy or frontend-to-backend flow.

Instructions

Return a Mermaid (default) or Graphviz DOT diagram for a slice of the graph: kind 'component-tree' (render hierarchy under a component) or 'fe-to-be' (frontend-to-backend flow). Paste the Mermaid block directly into chat to render it.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
kindNo
nameYesroot component/route/endpoint for the slice
formatNo
max_nodesNo
max_tokensNoresponse token budget (default 2000)
Behavior3/5

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

No annotations are provided, so the description must convey behavioral traits fully. It describes the return format and the two kinds, but does not disclose any side effects, authorization needs, or rate limits. The read-only nature is implied but not explicitly stated.

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?

The description is two sentences, front-loaded with the core purpose and parameters, followed by a practical usage tip. Every sentence earns its place with no redundancy.

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?

With 5 parameters, no output schema, and no annotations, the description should provide more depth. It explains the output format and kinds but omits details on 'max_nodes' behavior and the exact nature of the returned diagram. The practical tip helps, but there is room for improvement.

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 40%, but the description adds meaning for 'kind' (explains the two options) and 'format' (states default). It does not add info for 'max_nodes' or 'max_tokens' beyond the schema. The added value for key parameters warrants a score above the baseline.

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 returns a Mermaid or Graphviz DOT diagram for a graph slice, with explicit kinds 'component-tree' and 'fe-to-be'. This distinguishes it from sibling tools like 'find_component_relations' and 'map_frontend_to_backend' which perform different operations.

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 context on when to use (for visual graph slices) and a practical tip to paste the Mermaid block into chat. It does not explicitly state when not to use or compare with alternatives, but the sibling list and distinct purpose imply appropriate usage.

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/dorkian/code-graph-mcp'

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