create_relationship
Create a foreign key relationship between two columns in a schema, with configurable relationship type and delete/update behaviors.
Instructions
Создать связь (внешний ключ) между двумя колонками.
Args:
schema_uuid: UUID схемы.
source_table_uuid: UUID исходной таблицы.
source_column_uuid: UUID исходной колонки (FK-сторона).
target_table_uuid: UUID целевой таблицы (PK-сторона).
target_column_uuid: UUID целевой колонки (PK-сторона).
relationship_name: Название связи.
relationship_type: Тип связи (например, one_to_many, many_to_many).
delete_action: Действие при удалении: CASCADE, SET NULL, SET DEFAULT,
RESTRICT или NO ACTION.
update_action: Действие при обновлении: CASCADE, SET NULL, SET DEFAULT,
RESTRICT или NO ACTION.
branch_name: Ветка схемы (по умолчанию main).
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": {
"schema_uuid": "<schema_uuid>",
"source_table_uuid": "<source_table_uuid>",
"source_column_uuid": "<source_column_uuid>",
"target_table_uuid": "<target_table_uuid>",
"target_column_uuid": "<target_column_uuid>",
"relationship_name": "<relationship_name>",
"relationship_type": "<relationship_type>",
"delete_action": "<delete_action>",
"update_action": "<update_action>"
},
"name": "create_relationship"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| branch_name | No | main | |
| schema_uuid | Yes | ||
| delete_action | Yes | ||
| update_action | Yes | ||
| relationship_name | Yes | ||
| relationship_type | Yes | ||
| source_table_uuid | Yes | ||
| target_table_uuid | Yes | ||
| source_column_uuid | Yes | ||
| target_column_uuid | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |