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
| Name | Required | Description | Default |
|---|---|---|---|
| spec | Yes | ||
| atomic | No | ||
| dry_run | No | ||
| model_id | Yes |