Skip to main content
Glama

umlforge_erd_schema

Read-only

Design database schemas with typed ERDs, foreign keys, cardinality, integrity rules, and index recommendations. Flags N+1 query risks and scores normalisation and performance.

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.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
entitiesYes
report_modeNo
db_technologyNoPostgreSQL
access_patternsNo
domain_descriptionYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. 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, destructiveHint=false, and openWorldHint=true, so the safety profile is covered. The description adds real context beyond that: report_mode is gated to Pro/Team/Enterprise tiers, and it enumerates exactly what the output contains (erDiagram, schema narrative, integrity checklist, N+1 flags, Design Score). It does not address the idempotentHint=false implication that repeated calls may yield different output, which is the one remaining gap.

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 with a one-line purpose, then organized under clear headers (USE THIS WHEN, NOT FOR, Produces, Args) with the routing guidance before the output details. It is longer than average, but nearly every line is load-bearing; the Args block is somewhat verbose relative to the compact schema it mirrors.

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 five-parameter generative tool with an output schema present, this is complete: inputs are explained with examples, the report_mode entitlement constraint is disclosed, and the produced artifact list tells the agent what to expect without duplicating the output schema verbatim. Nothing an agent needs to invoke and interpret this tool 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 burden and does so: each of the five args is documented with meaning, concrete examples ('User(id, email, tier), Order(id, user_id, status, total)'), defaults (PostgreSQL), and inter-parameter relationships (access_patterns is optional and feeds index recommendations; report_mode additionally produces a Design Score report). This fully compensates for the empty schema descriptions.

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 opens with a specific verb and resource: 'Design a database schema with ERD, integrity rules, and index recommendations.' It names the artifacts produced and explicitly differentiates itself from sibling tools via the NOT FOR section. An agent can distinguish this from umlforge_reverse_engineer or umlforge_api_sequence 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?

Explicit USE THIS WHEN bullets state the triggering conditions (designing/reviewing a schema, needing an ERD, wanting index recommendations) and NOT FOR routes three adjacent scenarios to named alternatives with the reason each applies. This is textbook when/when-not/alternative guidance.

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