Skip to main content
Glama

design_schema

Design a database schema with DDD aggregate mapping for PostgreSQL/MySQL/MongoDB. Supports SQL DDL and Prisma output formats. If fields are omitted, smart inference suggests common fields based on the aggregate name.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "aggregate": "<aggregate>",
      "database": "<database>"
    },
    "name": "design_schema"
  }
}

Input Schema

NameRequiredDescriptionDefault
fieldsNoField definitions (name:type format, e.g., 'title:string', 'price:number'). If omitted, fields are inferred from aggregate name.
databaseYesTarget database
aggregateYesDDD aggregate root name (e.g., 'Homework', 'User', 'Order')
outputFormatNoOutput format (default: both)
existingModelsNoNames of existing models in your schema — used to auto-suggest relations
withSoftDeleteNoAdd deleted_at for soft deletes (default: false)
withTimestampsNoAdd created_at / updated_at columns (default: true)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.5/5.0
Behavior3/5

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

With no annotations present, the description carries the full behavioral burden and does disclose some real traits: smart field inference when 'fields' is omitted, target databases, and SQL DDL/Prisma output. What it omits matters, though — it never says whether a schema file is written to disk or text is returned, and it does not mention destructive risk or permissions. The stated database list also drops 'sqlite', which appears in the enum.

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 the core capability and supported databases, then the inference fallback. There is little waste, though the output-format sentence and the inference sentence could be tightened into one.

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 7-parameter generator with full schema coverage and no output schema, the description covers the capability, targets, and the key omission behavior. The main remaining gap is whether output is emitted as text or persisted to files, plus the sqlite mismatch against the enum.

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%, so the parameters are already documented, and the description mostly restates the inference default for 'fields'. It adds no guidance on the 'name:type' convention, how 'existingModels' drives relation suggestions, or how outputFormat 'both'/'typescript' differ in practice. Baseline 3 is appropriate when the schema does the heavy lifting.

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?

The description opens with a specific verb and resource ('Design a database schema') and adds the DDD aggregate-mapping angle plus supported output formats (SQL DDL, Prisma), which is enough for an agent to distinguish it from generic siblings like normalize_schema or convert_schema. It stops short of naming a sibling it is explicitly not, so it lands at 4 rather than 5.

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

Usage Guidelines3/5

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

Usage is only implied: the reader infers this is the tool for going from an aggregate name to a fresh schema, but no when-to-use/when-not-to-use conditions are stated. Nearby siblings such as map_aggregate_to_schema, create_event_store_schema and normalize_schema are never referenced, so the agent must guess at routing.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.