render_diagram
Convert Markdown diagrams into visual formats like SVG, PNG, or PDF. Extract diagrams from files or text and render them with customizable themes and styles.
Instructions
Render the first diagram found in a Markdown file or raw text.
Args: file_path: Path to a .md file containing a diagram block. raw_markdown: Raw markdown string with a diagram code block. output_format: "svg" (default), "png", "jpeg", or "pdf". theme: "light" (default) or "dark". look: "default" or "handDrawn" (Mermaid sketch mode). scale: Resolution multiplier for PNG/JPEG (default 2).
Returns: Dict with diagram_type, output_format, and base64-encoded output.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| file_path | No | ||
| raw_markdown | No | ||
| output_format | No | svg | |
| theme | No | light | |
| look | No | default | |
| scale | No |