Skip to main content
Glama
powerdesigner-mcp-dfd
by 011011bjf

create_database_schema

Creates a database schema from a JSON specification, defining tables, columns, keys, indexes, relationships, and domains; supports dry-run planning and atomic rollback on failure.

Instructions

Create a whole schema in one call from a JSON spec: {tables:[{name, code, comment, columns:[{name, code, data_type, length, precision, mandatory, default_value, comment, primary}], indexes:[...]}], relationships:[{parent_table, child_table, parent_columns, child_columns, name, cardinality, parent_cardinality, dependent_role}], domains:[...], indexes:[...]}. Primary keys are derived from columns with primary:true (or primary_key_columns). The plan follows the target model's kind: in a CDM/LDM 'tables' are entities, columns are attributes rendered in PowerDesigner's own type vocabulary, primary keys become identifiers, relationships become associations (cardinality = child end, parent_cardinality = parent end), and index entries are rejected. dry_run=true returns the execution plan without touching the model; atomic=true (default) rolls the model back if any step fails.

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": {
      "model_id": "<model_id>",
      "spec": "<spec>"
    },
    "name": "create_database_schema"
  }
}

Input Schema

NameRequiredDescriptionDefault
specYes
atomicNo
dry_runNo
model_idYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.0

TDQS

A4.3/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does so well: it discloses primary-key derivation, how the plan morphs by target model kind (entities/attributes/identifiers/associations), that index entries are rejected in CDM/LDM, that dry_run returns the plan without touching the model, and that atomic=true rolls back on any step failure. The notable gap is whether existing model content is preserved or merged, and what is returned on success, which matters for a mutating bulk tool.

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-loads the core action, then the payload shape, then the semantic mapping rules, so an agent can stop reading at any layer. The inline JSON skeleton is dense but earns its place as the only parameter documentation; a small amount of the mapping detail could be tightened.

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 complex, nested, mutation-heavy tool with no annotations and no output schema, the definition covers the semantics an agent most needs: payload structure, PK derivation, model-kind translation, dry-run preview, and rollback. It is short only on return values and on the effect on pre-existing schema content, which are the remaining risks for an agent invoking it blind.

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

Parameters4/5

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

Schema coverage is 0% and the only 'parameter' documentation is the description, which does substantial work by spelling out the top-level spec keys (tables, relationships, domains, indexes) and the column and relationship field sets, plus the primary/primary_key_columns fallback. It does not fully compensate: indexes and domains are elided as '[...]', data_type vocabularies are unspecified, and model_id is never described.

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 and resource ('Create a whole schema in one call') plus the input form ('from a JSON spec'), which distinguishes it from the single-object siblings like create_table, create_column, and create_index that each create one artifact. An agent can tell this is the bulk-schema entry point 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 Guidelines4/5

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

Implicitly routes bulk creation here ('in one call') rather than through the per-object tools, and gives concrete operational guidance on dry_run and atomic. It stops short of naming explicit alternatives (design_from_spec, apply_schema_patch, check_database_design) or stating when not to use it, so selection against siblings still requires inference.

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