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

create_primary_key

Defines or replaces a table's primary key from column codes, supporting single or composite keys, clearing old membership, and pointing CDM/LDM entities at the new identifier. Supports dry runs.

Instructions

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. In a CDM/LDM this builds the entity's primary identifier (attributes carry no primary flag there) and points the entity at it. 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>",
      "table_ref": "<table_ref>",
      "columns": "<columns>"
    },
    "name": "create_primary_key"
  }
}

Input Schema

NameRequiredDescriptionDefault
codeNo
nameNo
columnsYes
dry_runNo
model_idYes
table_refYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.0

TDQS

B3.1/5.0
Behavior3/5

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

With no annotations, the description carries the full behavioral burden. It usefully discloses that existing PK membership is cleared and explains CDM/LDM behavior, but it omits permission requirements, reversibility, error behavior, and return/result details.

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?

The description is front-loaded and reasonably efficient, with each sentence contributing purpose, side-effect, domain, or dry-run information. Some parenthetical and domain-specific phrasing adds density, but there is little wasted text.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a mutation tool with no annotations, no output schema, and 0% schema description coverage, the description still leaves major invocation details unexplained. It covers purpose and side effects well, but not the meanings or requirements of most parameters.

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

Parameters2/5

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

Schema description coverage is 0%, so the description must compensate for the six parameters. It explains the columns format with an example and mentions dry_run, but model_id, table_ref, code, and name are left undocumented.

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 states a specific verb and resource: create or replace a table's primary key from column codes. It clearly covers single-column and composite keys, but it does not explicitly distinguish this operation from sibling tools such as remove_primary_key or set_primary_key.

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?

The description implies when to use the tool by mentioning CDM/LDM entity semantics and dry_run support. However, it does not state when to choose this over related key-management tools or when not to use it.

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