get_table_constraints
Retrieve all constraints (PRIMARY KEY, FOREIGN KEY, UNIQUE, CHECK) defined on a specific table. Returns constraint type, name, and associated index.
Instructions
Return all constraints defined on a table: PRIMARY KEY, FOREIGN KEY, UNIQUE, and CHECK. database: key from list_databases. table: table name from list_objects — automatically uppercased. Returns [{constraint, type, index}]. For full FK relationship details (referenced columns, ON DELETE/UPDATE rules) use get_foreign_keys instead.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| database | Yes | ||
| table | Yes |