Tools / Diagram Generator
Diagram Generator icon

Diagram Generator

Render Mermaid, PlantUML & more

Render diagrams from text source code in Mermaid, PlantUML, Graphviz DOT, D2, C4-PlantUML, ERD, DBML, and more. Returns SVG or PNG plus a permanent URL for embedding. Great for architecture, flowcharts, and sequence diagrams.

1 skillv0.02
Generate Diagram

Render a diagram from text source code. Accepts Mermaid, PlantUML, Graphviz DOT, D2, C4-PlantUML, ERD, DBML, and more. Returns a rendered image file plus a permanent URL for embedding.

Returns: Rendered diagram image as a downloadable file plus a permanent URL for embedding
Parameters
source *stringThe diagram source text in the specified diagram language
typestringDiagram language (default "mermaid"). Supported: mermaid, plantuml, graphviz (DOT), d2, c4plantuml, erd, dbml, blockdiag, seqdiag, actdiag.
formatstringOutput image format (default "svg"). SVG is scalable and includes the raw markup; PNG is a raster image.
Example
Mermaid flowchart showing a CI/CD pipeline
curl -H "Authorization: Bearer $TOOLROUTER_API_KEY" \
  -d '{
  "tool": "diagram-generator",
  "skill": "generate_diagram",
  "input": {
    "source": "graph TD\n  A[Push Code] --> B[Run Tests]\n  B --> C{Tests Pass?}\n  C -->|Yes| D[Deploy to Staging]\n  C -->|No| E[Fix & Retry]\n  D --> F[Deploy to Production]",
    "type": "mermaid"
  }
}' \
  https://api.toolrouter.com/v1/tools/call
Loading reviews...
Loading activity...
v0.022026-03-22
  • Added subtitle, expanded description, and agent instructions
v0.012026-03-21
  • Initial release

Quick Start

MCP (Claude Code)
claude mcp add --transport stdio \
  --env TOOLROUTER_API_KEY=YOUR_API_KEY \
  toolrouter -- npx -y toolrouter-mcp
REST API
curl -H "Authorization: Bearer $TOOLROUTER_API_KEY" \
  -d '{"tool":"diagram-generator","skill":"generate_diagram","input":{}}' \
  https://api.toolrouter.com/v1/tools/call

Use Cases

Open Create Architecture Diagrams

Create Architecture Diagrams

Generate system architecture diagrams showing components, services, databases, and their connections.

Diagram Generator icon
Diagram Generator
4 agent guides
Open Generate Flowcharts

Generate Flowcharts

Create flowcharts that visualize processes, decision trees, and workflows with clear branching logic.

Diagram Generator icon
Diagram Generator
4 agent guides
Open Search Papers by Topic

Search Papers by Topic

Find relevant academic papers on any research topic across millions of scholarly publications.

Academic Research icon
Academic Research
4 agent guides
Open Geocode Addresses to Coordinates

Geocode Addresses to Coordinates

Convert street addresses into precise latitude and longitude coordinates for mapping and spatial analysis.

Address Geocoding icon
Address Geocoding
4 agent guides
View all use cases for Diagram Generator

Frequently Asked Questions

What kinds of diagrams can I generate?

`generate_diagram` supports Mermaid, PlantUML, Graphviz DOT, D2, C4-PlantUML, ERD, DBML, and similar text-based diagram formats.

Do I get an image file or just text output?

You get a rendered SVG or PNG plus a permanent shareable URL, so the diagram can be embedded or downloaded after it is generated.

What should I pass for the diagram type?

Pass the source code and the format type, and use `mermaid` if you want the default. SVG is the default output format for scalable diagrams.

Is this good for architecture and flowcharts?

Yes. It is built for architecture diagrams, flowcharts, sequence diagrams, and other structured visuals where text source is easier to version than pixels.