create_relationship
Create Dataverse table relationships: OneToMany adds a lookup column, while ManyToMany links records through an intersect table.
Instructions
Create a relationship between two tables. OneToMany adds a lookup column on related_entity that points to one primary_entity record; ManyToMany links records on both sides through an intersect table. Returns the relationship's URL; a schema_name that is taken is an error. This server has no tool to list or delete relationships.
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": {
"type": "<type>",
"primary_entity": "<primary_entity>",
"related_entity": "<related_entity>",
"schema_name": "<schema_name>"
},
"name": "create_relationship"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| type | Yes | Relationship type | |
| lookup_name | No | Logical name for lookup attribute (OneToMany only) | |
| schema_name | Yes | Unique schema name for the relationship | |
| primary_entity | Yes | Primary (referenced) entity logical name | |
| related_entity | Yes | Related (referencing) entity logical name | |
| lookup_display_name | No | Display name for lookup attribute (OneToMany only) |