List constraints
list_constraintsRetrieve a table's constraints — primary/foreign keys, unique, check, exclusion — with name, type, and SQL definition.
Instructions
List a table's constraints — primary/foreign keys, unique, check, exclusion. Returns a list of objects with name, type, and definition (the constraint SQL).
Example: list_constraints(schema='public', table='orders')
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| table | Yes | ||
| schema | Yes | ||
| database | No | Optional: target a configured secondary (read-only) database by name; omit for the primary. Call list_databases to see the configured ids. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |