Skip to main content
Glama

umlforge_erd_schema

Read-only

Design or review a database schema by generating an ERD with typed entities, foreign keys, integrity rules, index recommendations, and N+1 risk flags.

Instructions

Design a database schema with ERD, integrity rules, and index recommendations.

USE THIS WHEN:

  • You are designing or reviewing a database schema

  • You need an ERD with foreign keys, cardinality, and data types

  • You want index recommendations and N+1 risk flags

NOT FOR:

  • Full codebase analysis (which may include DB) → use umlforge_reverse_engineer

  • API flows between services → use umlforge_api_sequence

  • Event-driven data pipelines → use umlforge_event_driven

Produces:

  • erDiagram: entities with typed attributes, cardinality, FK labels

  • Schema narrative: one paragraph per entity — purpose, index recommendations, denormalisation decisions

  • Data integrity checklist: uniqueness, FK integrity, null policies, constraints

  • N+1 query risk flags

  • (report_mode=True) Design Score: Normalisation, Query Performance, Data Integrity (A–F)

Args: domain_description: What the database stores (e.g. "E-commerce: users, products, orders, payments"). entities: Known entities and key attributes (e.g. "User(id, email, tier), Order(id, user_id, status, total)"). access_patterns: Most frequent read/write queries (optional — used for index recommendations). db_technology: Database technology (default: PostgreSQL). report_mode: True → also produce a Design Score report. Pro/Team/Enterprise only. Omit to use your saved account preference (dashboard toggle); False forces diagrams only.

Input Schema

NameRequiredDescriptionDefault
entitiesYes
report_modeNo
db_technologyNoPostgreSQL
access_patternsNo
domain_descriptionYes

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changedv0.3.0
    • addedInput schema / properties / report_mode / anyOf
      Added value: +[
      +  {
      +    "type": "boolean"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • changedInput schema / properties / report_mode / default
      Previous value: -falseNew value: +null
    • removedInput schema / properties / report_mode / type
      Removed value: -"boolean"
  2. First observedv0.1.9

TDQS

A4.7/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true and destructiveHint=false, so safety is covered; the description adds genuine behavioral context beyond them, notably the report_mode Pro/Team/Enterprise tier gate and the 'omit to use saved account preference' fallback. It does not add rate limits or async/latency behavior, and the 'Produces' list partly duplicates the output schema.

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?

Front-loaded purpose followed by scannable headers; every section is short. Minor redundancy: the 'Produces' bullet list restates content already delivered by the output schema, so it doesn't fully earn its space, though the Args block is necessary given zero schema coverage.

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

Completeness5/5

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

For a 5-param generative tool with an output schema, the description supplies the routing rules, the optionality and defaults of inputs, and the account-tier constraint on report_mode. Nothing an agent needs to call it correctly is missing.

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 carries the full parameter burden and does so: each of the five args is documented with intent and concrete examples (domain_description, entities with typed attribute examples), access_patterns is marked optional with its use (index recommendations), db_technology has a stated default, and report_mode's tri-state semantics and tier restriction are explained.

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?

States a specific verb + resource ('Design a database schema with ERD, integrity rules, and index recommendations') and explicitly names the sibling tools it is not for (umlforge_reverse_engineer, umlforge_api_sequence, umlforge_event_driven). An agent can route correctly without opening any schema.

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

Usage Guidelines5/5

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

Has structured USE THIS WHEN and NOT FOR sections with named alternatives and the conditions selecting them (full codebase analysis → reverse_engineer, service API flows → api_sequence, event pipelines → event_driven). This is explicit when/when-not/alternatives coverage.

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