Skip to main content
Glama
jovian-zhibai

mcp-database

generate_er_diagram

Generate an Entity-Relationship diagram in Mermaid format to visualize table structures and relationships across connected databases.

Instructions

Generate an ER (Entity-Relationship) diagram in Mermaid format.

Args: connection_name: Name of the database connection (default: "default"). format: Output format. Currently only 'mermaid' is supported.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
formatNomermaid
connection_nameNodefault

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.0

TDQS

A4.1/5.0
Behavior3/5

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

With no annotations, the description carries the behavioral burden. It does disclose the key limitation that only 'mermaid' is currently supported, and describes the two inputs. However, it does not explicitly state that the operation is read-only, what it requires from the connection, or what the generated diagram contains.

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

Conciseness5/5

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

The description is compact and front-loaded: the first sentence states the tool's purpose, and the Args section briefly defines both parameters. Every sentence adds necessary information with no filler.

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 two-optional-parameter tool with an output schema, the description is nearly complete. It covers purpose, parameter meaning, defaults, and supported format. The only minor gap is that it does not describe how connection_name is used or what happens if the connection is invalid, but the output schema likely covers the return shape.

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

Parameters5/5

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

Schema description coverage is 0%, so the description must define the parameters, and it does. It explains that connection_name selects the database connection and defaults to 'default', and it explains format with the important constraint that only 'mermaid' is supported. This fully compensates for the bare schema.

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

Purpose5/5

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

The description uses a specific verb ('Generate') and resource ('ER diagram') and names the exact output format ('Mermaid'). This clearly separates it from sibling tools like get_schema or list_tables, which return raw schema information rather than a visual diagram.

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

Usage Guidelines3/5

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

The intended use is implied: call this when you need an ER diagram in Mermaid format. However, it does not explicitly say when to prefer it over alternatives such as get_schema or schema_diff, nor does it state any exclusions or conditions.

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