schema_to_erd
Turn any database schema into a Mermaid ER diagram. Accepts SQL DDL, Prisma, Drizzle, TypeORM, or SQLAlchemy schemas.
Instructions
Turn a database schema into a Mermaid erDiagram. Accepts SQL DDL, Prisma, Drizzle, TypeORM, or SQLAlchemy — pass a file path or the text directly. Returns the Mermaid source plus a ```mermaid fenced block you can paste straight into markdown.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| source_path | No | Path to a schema file (.sql, schema.prisma, *.ts, models.py). | |
| source_text | No | Schema source as text (alternative to source_path). | |
| source_type | No | Defaults to auto-detect. |