db_render_er_diagram
Generate Mermaid ER diagrams for multiple database tables to visualize relationships, foreign keys, and columns using an established connection.
Instructions
生成多个表的 Mermaid ER 图 (MCP App: mermaid 组件)。调用前需已通过 db_connect_test 建立连接。支持 MCP Apps 的客户端会渲染图表;不支持的客户端会看到纯文本摘要 + mermaid 源码。
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": {
"connection_id": "<connection_id>",
"database": "<database>",
"tables": "<tables>"
},
"name": "db_render_er_diagram"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| connection_id | Yes | Database connection ID from db_connect_test | |
| database | Yes | Database name | |
| tables | Yes | 表名列表 (至少 1 个) | |
| include_non_pk_columns | No | 是否列出非主键/外键列 (默认 true) |