validate_fk_integrity
Check a table's foreign keys to find orphan child rows missing their parent. Returns constraint details and orphan counts; an empty result means referential integrity holds.
Instructions
Check one or all foreign keys of a table and report orphan rows (child rows whose parent is missing). Returns one entry per FK with constraint name, child/parent columns and the orphan count; an empty list means referential integrity is intact.
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": {
"table": "<table>"
},
"name": "validate_fk_integrity"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| table | Yes | Table name. | |
| schema | No | Schema (owner) of the table. Optional — defaults to the server's current schema; omit rather than guess. | |
| constraint | No | Optional constraint-name filter; omit to check every FK on the table. |