Skip to main content
Glama

db_generate_erd

Generate a Mermaid ER diagram from SQL table definitions. Provide DDL CREATE TABLE statements to visualize database relationships clearly.

Instructions

Parses SQL table definitions and generates a clean Mermaid Entity-Relationship (ER) Diagram

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
schemaSqlYesDDL SQL string containing CREATE TABLE statements
Behavior3/5

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

With no annotations, the description carries the full burden. It states the input (SQL table definitions) and output (Mermaid ER diagram) but does not disclose edge-case behavior (e.g., invalid SQL handling, foreign key detection, input size limits) or confirm non-destructive/read-only nature. For a generation tool, the core behavior is clear, but lacks depth.

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 a single sentence with no filler. It front-loads the action and resource, and every word contributes meaning. Ideal conciseness.

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?

The description explains the output (Mermaid ER Diagram) despite no output schema, which is helpful. However, it does not specify the exact return format (e.g., string, file path) or error behavior. For a simple one-parameter tool with clear input/output, the description is mostly complete, but minor details are absent.

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%, and the schema already provides a clear description of the parameter (DDL SQL string containing CREATE TABLE statements). The description does not add any additional semantics beyond what the schema offers, so the baseline 3 applies.

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 clearly states a specific verb (parses, generates) and resource (SQL table definitions → Mermaid ER Diagram). It is unambiguous and distinct from all sibling tools, none of which mention ERD or DDL processing.

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?

The description provides clear context for when to use the tool: when you have DDL SQL and want an ER diagram. It does not explicitly exclude alternatives, but since no sibling tool serves a similar purpose, the context is sufficient. Missing explicit 'when not to use' guidance, but not a significant gap.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/ieeecsopen/mcp-cs'

If you have feedback or need assistance with the MCP directory API, please join our Discord server