Skip to main content
Glama
MySQL MCP Server

MySQL MCP Server

by berthojoris

get_schema_erd

Read-onlyIdempotent

Generates a Mermaid.js ER diagram of MySQL tables and foreign-key relationships for database visualization and schema documentation.

Instructions

📈 Generates a visual Mermaid.js ER diagram showing tables and their relationships. Perfect for visualizing database structure and foreign key connections. Use when users ask to 'visualize' or 'diagram' the database.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "get_schema_erd"
  }
}

Input Schema

NameRequiredDescriptionDefault
databaseNoOptional: specific database name

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.46.0

TDQS

A3.9/5.0
Behavior4/5

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

Annotations already declare readOnlyHint, idempotentHint, non-destructive and closed-world, so the safety profile is covered. The description adds genuinely new context that the annotations do not: the return is Mermaid.js diagram text rather than data rows, which matters a lot with no output schema. It omits scope (whole server vs. one database) and any size/rendering limits, keeping it below a 5.

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?

Three short sentences, front-loaded with what the tool produces, then the use case. The middle sentence ('Perfect for visualizing database structure and foreign key connections') largely restates the first and is the only real 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 simple one-optional-parameter, read-only tool with no output schema, the description tells the agent what it produces (Mermaid ERD), what it covers (tables and relationships), and when to invoke it. Only the default scope of the optional database parameter is left unexplained.

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?

There is a single optional 'database' parameter with 100% schema description coverage, so the schema already explains it fully. The description adds no meaning about what omitting the parameter does (e.g., defaults to all databases), so it neither helps nor hurts beyond baseline.

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 and resource ('Generates a visual Mermaid.js ER diagram') plus the scope ('tables and their relationships'), which implicitly separates it from text-oriented siblings like list_foreign_keys or get_all_tables_relationships. It never names an alternative explicitly, so it stops short of a 5.

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

Usage Guidelines4/5

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

Gives a concrete trigger condition: 'Use when users ask to ‘visualize’ or ‘diagram’ the database.' That is actionable routing guidance. It offers no when-not condition or named alternative for cases where a textual relationship listing would be better.

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