generate_diagram
Create Mermaid diagrams for file trees in a codebase, visualizing directory structures, dependencies, and file importance. Customize layout, depth, and style for clear code architecture insights.
Instructions
Generate a Mermaid diagram for the current file tree
Input Schema
Name | Required | Description | Default |
---|---|---|---|
layout | No | ||
maxDepth | No | Maximum depth for directory trees (1-10) | |
minImportance | No | Only show files above this importance (0-10) | |
outputFile | No | Optional output file name for the diagram | |
outputFormat | No | Output format (mmd or png) | |
showDependencies | No | Whether to show dependency relationships | |
style | Yes | Diagram style |
Input Schema (JSON Schema)
{
"$schema": "http://json-schema.org/draft-07/schema#",
"additionalProperties": false,
"properties": {
"layout": {
"additionalProperties": false,
"properties": {
"direction": {
"enum": [
"TB",
"BT",
"LR",
"RL"
],
"type": "string"
},
"nodeSpacing": {
"maximum": 100,
"minimum": 10,
"type": "number"
},
"rankSpacing": {
"maximum": 100,
"minimum": 10,
"type": "number"
}
},
"type": "object"
},
"maxDepth": {
"description": "Maximum depth for directory trees (1-10)",
"type": "number"
},
"minImportance": {
"description": "Only show files above this importance (0-10)",
"type": "number"
},
"outputFile": {
"description": "Optional output file name for the diagram",
"type": "string"
},
"outputFormat": {
"description": "Output format (mmd or png)",
"enum": [
"mmd",
"png"
],
"type": "string"
},
"showDependencies": {
"description": "Whether to show dependency relationships",
"type": "boolean"
},
"style": {
"description": "Diagram style",
"enum": [
"default",
"dependency",
"directory",
"hybrid"
],
"type": "string"
}
},
"required": [
"style"
],
"type": "object"
}