PowerDesigner MCP
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| PDMCP_PD_EXE | No | Path to `pdshell16.exe`. Auto-detected if not set. | |
| PDMCP_ADAPTER | No | Adapter choice: `com` / `mock` / `auto`. | auto |
| PDMCP_VISIBLE | No | Show PowerDesigner window when we launch it. | false |
| PDMCP_ATTACH_MODE | No | Attach mode: `auto` / `attach` (ROT) / `launch` (start pdshell) / `new`. | auto |
| PDMCP_CALL_TIMEOUT | No | Per COM-call timeout (seconds). | 300 |
| PDMCP_DEFAULT_DBMS | No | DBMS for new PDMs, e.g. `MySQL 5.0`. Defaults to PowerDesigner's default. |
Instructions
Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.
This server publishes no instructions, or was last inspected before Glama recorded them.
Capabilities
Features and capabilities supported by this server
Protocol revision2025-11-25
| Capability | Details |
|---|---|
| tools | {
"listChanged": false
} |
| prompts | {
"listChanged": false
} |
| resources | {
"subscribe": false,
"listChanged": false
} |
| experimental | {} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| get_server_infoA | Check the PowerDesigner connection and report server capabilities. Call this first to verify PowerDesigner is reachable (or that the mock backend is active). Returns version, attach mode, open model count. |
| list_open_modelsA | List all models currently open in PowerDesigner with kind (PDM/CDM/LDM), name, code, file path, DBMS and object counts. |
| open_modelA | Open a PowerDesigner model file (.pdm / .cdm / .ldm) and return its info. Set read_only=true to prevent modifications. |
| create_modelA | Create a new empty model. kind: 'PDM' | 'CDM' | 'LDM'. For PDM you may pass dbms (e.g. 'MySQL 5.0'); PowerDesigner picks its default when omitted. Returns the new model info including its model_id. |
| save_modelA | Save a model to its current file. Fails with a clear error when the model was never saved (use save_model_as first). |
| save_model_asA | Save a model to a new file path (.pdm/.cdm/.ldm extension is appended automatically). The target file must not exist yet. |
| close_modelB | Close a model in PowerDesigner. save=true saves to its file before closing. |
| get_model_infoA | Get detailed info about one open model: kind, name, code, file, DBMS, and counts of tables/entities, columns, keys, references, indexes, domains. |
| list_packagesA | List packages (sub-models/namespaces) of a model. |
| get_packageC | Get details of one package by ref, code or name. |
| list_tablesA | List tables (PDM) or entities (CDM/LDM) of a model. Supports text search over code/name and optional package filter. Returns brief rows - use get_table for full detail. |
| get_tableB | Get full detail of one table/entity by ref or code: columns (type, length, mandatory, default, comment, primary), keys, primary key, indexes and incoming/outgoing references. |
| search_tablesB | Search tables by substring in code or name (case-insensitive). |
| list_columnsC | List columns of a table with full attributes. Optional text search. |
| get_columnC | Get one column's full detail. |
| search_columnsA | Search columns across the whole model (or one table) by substring in code/name. Returns table_code + column detail rows. |
| list_keysB | List keys of a table. The primary key has primary=true and its columns are included (supports single-column and composite keys). |
| get_keyB | Get one key by ref (from list_keys). |
| list_indexesA | List indexes of one table or of the whole model. Shows unique flag and covered columns (supports simple, unique and composite indexes). |
| get_indexC | Get one index's full detail. |
| list_referencesA | List foreign-key references (PDM) of a model: parent/child tables, join column pairs, cardinality and mandatory flag. |
| get_referenceC | Get one reference's full detail. |
| list_relationshipsA | List relationships of a CDM/LDM model (entity-to-entity relations). For PDM models use list_references instead. |
| get_relationshipB | Get one CDM/LDM relationship by ref. |
| list_domainsB | List domains (reusable data type definitions) of a model. |
| get_domainC | Get one domain's detail. |
| model_snapshotB | Convert the model into compact JSON the AI can reason over. mode='summary': one line per table + references. mode='detail': full columns/keys/indexes/references. Optionally restrict to given table codes. |
| inspect_schemaA | Inspect the whole schema at once. mode='summary'|'detail', optional single table, paginated. Returns tables + foreign keys view; use this instead of many list_* calls to save context. |
| compare_modelA | Structurally compare two open models: added/removed/modified tables, added/removed/modified columns per table, references and domains. |
| create_tableA | Create a table (PDM) or entity (CDM/LDM). Optionally pass an inline 'columns' array (same shape as create_column's column spec) to create columns in the same call. Supports dry_run. |
| rename_tableB | Rename a table (Name and/or Code). Supports dry_run. |
| update_tableC | Update table properties: name, code, comment. Supports dry_run. |
| delete_tableA | Delete a table (and PowerDesigner cascades its columns/keys/indexes and attached references). Destructive: prefer dry_run first. |
| create_columnA | Add a column to a table. Supported properties: name, code, data_type (e.g. 'VARCHAR', 'INT', 'DATETIME'), length, precision, mandatory, default_value, comment, description, domain (ref or code), primary (include in primary key). Supports dry_run. |
| rename_columnB | Rename a column (Name and/or Code). Supports dry_run. |
| update_columnA | Update column properties: name, code, data_type, length, precision, mandatory, default_value, comment, description, domain, primary. Only supplied values are changed. Supports dry_run. |
| delete_columnA | Delete a column from a table. Destructive: prefer dry_run first. |
| create_primary_keyB | Create (or replace) the primary key of a table from the given column codes. Supports single-column and composite keys, e.g. columns=['order_id','product_id']. Existing PK membership is cleared. Supports dry_run. |
| set_primary_keyA | Alias of create_primary_key: replaces the table's primary key with the given columns (composite supported). |
| remove_primary_keyA | Remove the primary key from a table. Destructive: prefer dry_run first. |
| create_referenceA | Create a foreign-key reference between two PDM tables (1:N from parent to child). If parent_columns/child_columns are omitted, the parent's primary key is used and FK columns are auto-created in the child (update_key=true, e.g. user 1--N order creates order.user_id). cardinality like '0,n' or '1,1'. Supports dry_run. |
| update_referenceC | Update a reference: name, code, comment, mandatory, parent_role, child_role, cardinality ('0,n', '1,1', ...). Supports dry_run. |
| delete_referenceA | Delete a foreign-key reference (the FK columns in the child are kept). Destructive: prefer dry_run first. |
| create_indexB | Create an index on a table: normal, unique or composite. Example: columns=['user_id','create_time'], name='idx_order_user_time'. Supports dry_run. |
| update_indexC | Update an index: name, unique flag, comment, or replace its columns. Supports dry_run. |
| delete_indexA | Delete an index. Destructive: prefer dry_run first. |
| create_database_schemaA | Create a whole database 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}], domains:[...], indexes:[...]}. Primary keys are derived from columns with primary:true (or primary_key_columns). dry_run=true returns the execution plan without touching the model; atomic=true (default) rolls the model back if any step fails. |
| apply_schema_patchA | Apply an ordered list of structured patch operations to a model. operations: [{op: create_table|alter_table|rename_table|drop_table|add_column|alter_column|drop_column|create_primary_key|drop_primary_key|create_reference|alter_reference|drop_reference|create_index|alter_index|drop_index|create_domain, ...}]. Execution stops at the first failure and (atomic, default) rolls back. dry_run=true returns the plan. |
| design_from_specA | Materialise a full design spec into a NEW model (or extend an existing one via model_id). spec: {model:{kind: 'PDM'|'CDM'|'LDM', name, code, dbms}, tables/entities:[...], relationships:[...], domains:[...], indexes:[...]}. The AI supplies the design; this tool executes it. Supports dry_run. |
| validate_modelA | Run built-in structural checks on a model: missing primary keys, duplicate table/column codes, missing data types, missing comments, FK type mismatches, dangling references, duplicate/redundant indexes. Returns passed/errors/warnings with object locations - fix issues and re-run to close the loop. |
| check_database_designA | Check a model against YOUR design rules. rules: [{id, description, type, params?, severity?}]. Machine-checkable types: TABLE_HAS_PK, TABLE_CODE_PATTERN, TABLE_NAME_STYLE, COLUMN_HAS_COMMENT, COLUMN_CODE_PATTERN, COLUMN_MANDATORY, REQUIRED_COLUMNS, PK_NAME_PATTERN, FK_NAME_PATTERN, INDEX_NAME_PATTERN, DATA_TYPE_ALLOWED, NO_DUPLICATE_INDEX, NO_EMPTY_COMMENT_TABLE, REGEX. Rules with unknown types are reported in 'skipped' (never silently ignored). Returns passed/errors/warnings/violations. |
| generate_ddlA | Generate SQL DDL for a PDM using PowerDesigner's native database generation for the model's DBMS. output_path: target .sql file (created if the directory exists). Returns the SQL text plus file info. The model's own DBMS is used; requesting a different dbms returns a clear error. |
| convert_cdm_to_ldmC | Convert a CDM model to an LDM. Uses PowerDesigner's native conversion when available, otherwise a structured mapping. Returns the new model info. |
| convert_cdm_to_pdmA | Convert a CDM model to a PDM (optionally pass dbms, e.g. 'MySQL 5.0'). Native conversion first, structured mapping as fallback. |
| convert_ldm_to_pdmC | Convert an LDM model to a PDM (optionally pass dbms). Native conversion first, structured mapping as fallback. |
| begin_transactionA | Start a transaction before a batch of modifications. For file-backed models the current file is saved and backed up so rollback can restore the exact pre-transaction state. Pass the returned txn_id to commit_transaction / rollback_transaction. |
| commit_transactionA | Commit a transaction: keeps all changes and discards the backup. |
| rollback_transactionA | Roll a transaction back: file-backed models are restored from the pre-transaction backup and reopened (the model_id may change - run list_open_models). Without a file backup, create/update operations are undone via the operation journal; deletions without backup cannot be undone and are reported explicitly. |
| list_model_backupsA | List available model backup files (created by transactions and save operations) in the backup directory. |
| rollback_modelA | Restore a model from a backup file (latest backup, or pass backup_file from list_model_backups). Closes the model, restores the file and reopens it. |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
| database_design_workflow | 数据库课程设计全流程工作流:需求 → CDM → LDM → PDM → 约束/索引 → 校验 → DDL。参数:需求描述与模型文件路径(可选)。 |
| schema_review | 对现有模型做一次评审:结构校验 + 自定义规范规则 + 修复建议。 |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
| Open models | All models currently open in PowerDesigner. |
TDQS
Scored across 60 tools
Tools are mostly grouped by resource type with clear list/get/create/update/delete distinctions, but there is notable overlap: list_tables vs search_tables, list_columns vs search_columns, model_snapshot vs inspect_schema, and validate_model vs check_database_design. The aliased create_primary_key/set_primary_key pair and multiple batch-modification tools (create_database_schema, apply_schema_patch, design_from_spec) add further selection ambiguity, though descriptions do mitigate confusion.
The overwhelming majority of tools follow a clear verb_noun snake_case pattern: list_tables, get_column, create_reference, update_index, delete_reference. Minor deviations exist: model_snapshot, inspect_schema, design_from_spec, and begin/commit/rollback_transaction use noun-first or non-standard forms, but they are still readable and the pattern is highly consistent overall.
At 60 tools, the surface is extremely large and exceeds the 50+ threshold for extreme mismatch, even accounting for PowerDesigner's broad domain. While each tool is individually meaningful, the sheer count creates a heavy integration burden and overlaps among search/snapshot/batch tools suggest it could be consolidated.
The toolset covers nearly the full lifecycle for models, tables, columns, keys, indexes, and references, and adds transaction management, validation, DDL generation, and model conversion. Minor gaps exist: CDM/LDM relationships only have list/get with no dedicated create/update/delete, domains lack direct CRUD, and there is no delete_model tool, though these can be worked around via apply_schema_patch or design_from_spec.