display_schema
Render a database schema as an interactive ER diagram in the browser. Pass raw DBML or a .dbml file path to visualize relationships, and re-invoke to live-reload changes.
Instructions
Render a database schema as an interactive, dbdiagram.io-style ER diagram (draggable table cards, relationship lines, pan/zoom) in the local browser. Accepts DBML text via dbml, or a path to a .dbml file via filePath. With neither, it shows the bundled project schema. The browser view live-reloads when you call this again with an updated schema.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| dbml | No | Raw DBML source (dbdiagram.io syntax). Takes precedence over filePath. | |
| open | No | Open the browser automatically on first render (default true). | |
| title | No | Title shown in the diagram toolbar. | |
| context | No | Optional extra panels beyond the schema diagram. When provided, an 'Infrastructure' and/or 'How it was built' tab appear. Shape: { infrastructure: [{ title, rows: [[label, value], ...] }], buildSteps: [{ phase, items: [{ what, why }] }] }. Use for live wiring (database, auth/OAuth, env var NAMES only — never secret values, repo, MCP) and the build narrative. | |
| filePath | No | Path to a .dbml file (absolute, or relative to the server's cwd). |