describe_table
Inspect PostgreSQL table structure before querying: shows columns, data types, nullability, defaults, primary keys, indexes, and foreign keys.
Instructions
Describe a PostgreSQL table: columns with data types, nullability and defaults, plus primary key, indexes and foreign keys.
Use this before writing a query against an unfamiliar table.
Args: table: Table, view or materialized view name. schema: Schema name. Defaults to the session schema, then 'public'. database: Database name. Defaults to the session database.
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": "describe_table"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| table | Yes | ||
| schema | No | ||
| database | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |