Skip to main content
Glama

generate_dependency_diagram

Generates a Mermaid flowchart showing module and file dependencies within a project directory. Supports configurable granularity, focus prefix, and direction to tailor the diagram.

Instructions

모듈/파일 연결관계를 한 장의 Mermaid flowchart 로 생성한다.

반환된 mermaid 텍스트를 그대로 코드블록으로 보여 주면 된다.

Args: path: 분석할 프로젝트 디렉터리의 절대 경로. granularity: "folder"(폴더 조감도, 기본) 또는 "file"(파일 상세). focus: 특정 폴더 접두사로 확대(드릴다운). 비우면 전체. direction: 방향 — TD/TB/LR/RL/BT.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYes
focusNo
directionNoTD
granularityNofolder

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.6/5.0
Behavior3/5

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

The description discloses that the tool returns Mermaid text that can be shown as a code block, which is useful. However, with no annotations provided, it carries the full burden of behavioral disclosure and does not mention side effects, error handling, performance characteristics, or any constraints. It gives some context but lacks depth.

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 concise and well-structured, leading with the purpose and then listing parameters clearly. It avoids unnecessary verbosity and front-loads the core functionality, though it could be slightly tighter by removing the redundant instruction about displaying the result.

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

Completeness4/5

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

Given the absence of an output schema and annotations, the description adequately explains the return format and how to use it. It covers all parameters and provides defaults. However, it lacks guidance on error cases (e.g., invalid path) or scale limitations, which might be relevant for an analysis tool, so it is not fully complete.

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

Parameters5/5

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

Schema description coverage is 0%, so the description must compensate. It thoroughly explains all four parameters: path (absolute directory path), granularity (folder vs. file with default), focus (prefix for drill-down), and direction (TD/TB/LR/RL/BT). This fully clarifies each parameter's meaning and defaults beyond the bare schema.

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

Purpose4/5

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

The description clearly states the tool generates a Mermaid flowchart of module/file dependencies, which is specific and identifies the resource. However, it does not explicitly differentiate from the sibling tool 'extract_dependency_graph', which likely has overlapping functionality, so it falls short of a 5.

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

Usage Guidelines2/5

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

There is no guidance on when to use this tool versus the siblings like extract_dependency_graph or analyze_structure. The description only explains what it does, not the conditions that would make it the preferred choice, so the agent must infer usage context.

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