clean_mermaid_diagram
Strips unwanted notes, empty curly braces, and post-newline strings from Mermaid class diagrams, producing cleaner output for analysis.
Instructions
Clean a Mermaid class diagram by removing unwanted elements.
This tool removes:
- All note statements that would render as unreadable yellow boxes
- Empty curly braces from class definitions (handles both single-line and multi-line)
- Strings after newline characters (e.g., truncates "ClassNameextra" to "ClassName")
Args:
mermaid_content: The raw Mermaid class diagram content
Returns:
Cleaned Mermaid content with note statements, empty braces, and post-newline strings removed
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mermaid_content | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |