Skip to main content
Glama
nandanosql

database-explorer-mcp

by nandanosql

generate_erd

Create a Mermaid-format Entity Relationship Diagram from a database schema, optionally limited to specific tables, for rendering in Mermaid viewers.

Instructions

Generate an Entity Relationship Diagram (ERD) in Mermaid format from the database schema. The output can be rendered in any Mermaid-compatible viewer. Optionally filter to specific tables.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
tablesNoSpecific table names to include (omit for all tables)
connectionNoConnection alias (default: 'default')

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.1.0

TDQS

B3.2/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries the full behavioral burden, and it does disclose the output format (Mermaid) and that it can be rendered in any Mermaid-compatible viewer. However, it says nothing about permissions, connection/auth requirements, or behavior on large schemas, leaving gaps given zero annotation coverage.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two tight sentences with the core purpose front-loaded, followed by useful output-rendering context and the optional filter. Efficient, though the rendering sentence is slightly supplementary rather than essential.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a low-complexity, read-only generation tool with only two optional params and no output schema, the description covers what is produced and in what format. It lacks context on database connection scope and scale limits, but is otherwise adequate to call the tool correctly.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so both parameters are already documented (tables, connection). The description's 'optionally filter to specific tables' merely restates the tables parameter and adds no syntax or format detail beyond the schema, so the baseline of 3 applies.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb (Generate) and resource (Entity Relationship Diagram) plus the concrete output format (Mermaid), so an agent immediately grasps what it produces. It doesn't explicitly differentiate itself from siblings like get_schema or describe_table, but the ERD output is inherently distinct.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description gives no guidance on when to choose this over alternatives such as get_schema or describe_table, nor any prerequisites. The only usage signal is the optional table filter, which is really parameter behavior rather than tool-selection guidance.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.