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.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "schema_to_erd"
}
}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. |