MERMAID_CONVERT is not available in organizations with an egress policy (a restriction on which external hosts sandboxes may reach): its sandbox has no egress-controlled variant yet. Steps that use it fail with an error beginning “This tool cannot run for an organization with an egress policy”.
Tools
MERMAID_CONVERT
- Convert Mermaid diagram code to PNG, SVG, or PDF images
- Runs securely in E2B sandbox environment - no local installation required
- Supports all Mermaid diagram types
- Background color options: transparent or white (PNG only)
- Clean, high-quality diagram output
- Returns a signed URL for downloading the generated image
Render a business workflow diagram
Render a sequence diagram
Render a state diagram
Supported Diagram Types
Basic Syntax Examples
Flowchart
Sequence Diagram
Class Diagram
State Diagram
Styling and Theming
Custom Colors
Node Styling
Use Cases
- Business Process Documentation: Approval workflows, operational procedures
- System Architecture: API interactions, microservices communication
- Database Design: ER diagrams, schema relationships
- Project Planning: Gantt charts, timelines
- Technical Documentation: Class diagrams, state machines
- User Experience: User journeys, interaction flows
- Version Control: Git branching strategies, release processes
Best Practices
Diagram Design
- Keep diagrams focused and not too complex
- Use clear, descriptive labels
- Apply consistent styling
- Add notes for important context
- Use appropriate diagram type for the use case
Formatting
- Use proper indentation for readability
- Group related elements together
- Use comments to explain complex logic
- Test diagrams before using in production
Performance
- Large diagrams may require longer timeout
- Consider splitting very complex diagrams
- Use SVG for web display (smaller file size)
- Use PNG/PDF for documents and presentations
Accessibility
- Use high contrast colors
- Include descriptive labels
- Provide alternative text descriptions
- Ensure font sizes are readable
Choose an output format
Limitations
- Very complex diagrams may hit timeout limits
- File size limits apply for output-files API
- Background color option only works with PNG format
- Some advanced Mermaid features may require specific versions