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

create_reference

Creates parent-child references in PowerDesigner models: generates foreign-key columns for PDMs and conceptual relationships for CDM/LDM, with optional dry-run validation.

Instructions

Create an association between two objects. In a PDM this is a foreign-key reference (parent 1--N 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). In a CDM/LDM it is a conceptual relationship between entities: parent_table/child_table name Entity1/Entity2, parent_columns/child_columns/update_key are ignored. cardinality = multiplicity at the child end ('0,n', '1,1', '1,n'; '0..*' also accepted); parent_cardinality = multiplicity at the parent end (default '1,1'; set '0,n' on both for M:N). dependent_role marks a weak/dependent side as 'A'/'B', '1'/'2' or an entity code. Supports dry_run.

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>",
      "parent_table": "<parent_table>",
      "child_table": "<child_table>"
    },
    "name": "create_reference"
  }
}

Input Schema

NameRequiredDescriptionDefault
codeNo
nameNo
commentNo
dry_runNo
model_idYes
update_keyNo
cardinalityNo0,n
child_tableYes
parent_tableYes
child_columnsNo
dependent_roleNo
parent_columnsNo
parent_cardinalityNo

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 well: it discloses the key side effect that omitting column params causes the parent PK to be used and FK columns to be auto-created in the child, and that update_key/parent_columns/child_columns are silently ignored in CDM/LDM. It never explains what dry_run actually returns or how the tool behaves on duplicate/invalid references, leaving the write and preview semantics partly opaque.

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 the one-line purpose, then cleanly split into PDM, CDM/LDM, cardinality, dependent_role and dry_run clauses — each sentence adds information with no filler. It is dense, semicolon-heavy prose in a single block, which costs some scannability.

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 13-parameter, dual-mode mutation tool with no annotations and no output schema, the description covers the mode branching, defaults, side effects and validation-shaped parameters well. It falls short on error/idempotency behavior, permission requirements, and the return value of the operation (especially dry_run), which the missing output schema leaves entirely undocumented.

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%, so the description must compensate for all 13 parameters, and it does for the non-obvious ones: parent/child columns, update_key, cardinality format and semantics, parent_cardinality default, and dependent_role's accepted values. The remaining gaps are the self-evident fields (model_id, code, name, comment) and dry_run, whose effect is named but not 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 an association between two objects') and then defines what that association means in each model type — foreign-key reference in PDM, conceptual relationship in CDM/LDM. An agent can distinguish this from get_reference/update_reference/delete_reference and from create_column purely from the text.

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?

Provides genuine conditional guidance: use the PDM path when tables are physical, the CDM/LDM path when parent_table/child_table name entities and column params are ignored, and set '0,n' on both cardinalities for M:N. It does not state prerequisites (model and tables must already exist) or when to prefer another tool such as create_column for a standalone FK column, so it stops short of full when/when-not coverage.

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