list_constraints
Lists PRIMARY KEY, FOREIGN KEY, UNIQUE, and CHECK constraints for a table to reveal schema rules and relationships; optionally target a specific database.
Instructions
Lists all constraints (PRIMARY KEY, FOREIGN KEY, UNIQUE, CHECK) for a table.
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_name": "<table_name>"
},
"name": "list_constraints"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| database | No | Optional: specific database name | |
| table_name | Yes | Name of the table |