Generate schema diagram
generate_schema_diagramRender a Mermaid ER diagram for a PostgreSQL schema, excluding views and foreign tables; set include_partitions=true to show partitions as entities. Output is ready for Markdown.
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)
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"schema": "<schema>"
},
"name": "generate_schema_diagram"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| schema | Yes | ||
| database | No | Optional: a database id from list_databases, to target a configured secondary (read-only) database; omit for the primary. Database names that are not configured ids are rejected. | |
| include_partitions | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |