Skip to main content
Glama

generate_erd

Generates an ERD.md with a valid Mermaid diagram, data dictionary, index strategies, foreign key cascade behaviors, and production SQL DDL migrations for documenting relational database schemas.

Instructions

Generates an Entity Relationship Diagram (ERD.md) with valid Mermaid diagram, complete data dictionary, index strategies, foreign key cascade behaviors, and production SQL DDL migrations.

Input Schema

NameRequiredDescriptionDefault
detailNolite: core contract only, no diagrams, glossary, risk tables, or fixtures (about 25% fewer tokens). full (default): everything.
entitiesNo
outputPathNoFile to write ERD.md to. Relative paths are resolved from the workspace root the editor reports, otherwise from the server's working directory, which may not be the user's project. Prefer the full path of the user's project folder. If the user has not said where the project is, ask before calling. Folders inside the starter-doc-mcp install are rejected.
descriptionNoRelational data persistence schema
projectNameYes
databaseEngineNoPostgreSQL
templatePresetNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.1.1

TDQS

B3.4/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 helpfully discloses the generated contents (Mermaid diagram, data dictionary, index strategies, FK cascades, SQL DDL), but it does not state overwrite behavior, file-writing side effects, permission requirements, or error conditions.

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 definition is a single, front-loaded sentence with no filler. Every phrase describes a concrete output artifact, making it efficient and easy to scan.

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

Completeness3/5

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

No output schema exists, so the artifact list is useful for understanding what will be returned. However, for a seven-parameter generator with low schema description coverage and no annotations, the definition still leaves input semantics and usage conditions under-specified.

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

Parameters2/5

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

Schema coverage is only 29%, and the description mentions no parameters at all. The schema documents detail, outputPath, field type, and references, but projectName, entities, databaseEngine, templatePreset, indexes, and cascadeRules remain unexplained, so the description does not compensate for the coverage gap.

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 gives a specific verb and resource: generates an Entity Relationship Diagram (ERD.md). It also lists the concrete artifacts included, so an agent can distinguish this documentation-generation tool from sibling spec generators such as generate_srs or generate_prd.

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 explains what the tool produces but gives no when-to-use guidance, no exclusions, and no comparison to sibling tools. An agent must infer usage solely from the tool name and output description.

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