create_primary_key
Create or replace a table's primary key from specified column codes, supporting single and composite keys. Clears existing PK membership and includes a dry-run option for safe validation.
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. 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
| Name | Required | Description | Default |
|---|---|---|---|
| code | No | ||
| name | No | ||
| columns | Yes | ||
| dry_run | No | ||
| model_id | Yes | ||
| table_ref | Yes |