get_foreign_keys
Retrieves foreign key relationships between SQL Server tables, optionally filtered by table, to map dependencies and understand schema relationships.
Instructions
Get foreign key relationships between tables
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": {
"database": "<database>"
},
"name": "get_foreign_keys"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| table | No | Filter by table name (shows FKs from and to this table) | |
| server | No | SQL Server instance (e.g., "server\instance" or "server,port"). Uses default if not specified. | |
| database | Yes | Database name |