Generate schema diagram
generate_schema_diagramRender a Mermaid ER diagram for a PostgreSQL schema, excluding views and foreign tables. Optionally include partitioned tables as separate entities.
Instructions
Render a Mermaid ER diagram for a schema. Views and foreign tables are excluded; partitions are excluded by default — pass include_partitions=true to draw each partition as its own entity. Returns the Mermaid erDiagram as a string ready to paste into a Markdown block.
Example: generate_schema_diagram(schema='public', include_partitions=false)
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| schema | Yes | ||
| database | No | Optional: target a configured secondary (read-only) database by name; omit for the primary. Call list_databases to see the configured ids. | |
| include_partitions | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |