Describe a table
pg_describe_tableInspect a PostgreSQL table, view, materialized view, or foreign table to see columns, keys, constraints, indexes, triggers, policies, partitions, size, and stats before writing queries.
Instructions
Describe one table, view, materialized view or foreign table: columns with types, defaults and comments; primary key, foreign keys (both directions), unique and check constraints; indexes with size and usage; triggers; row security policies; partitions; size, estimated rows and last vacuum/analyze.
table is name or schema.name. Read this before writing a query against a table.
detail="summary" returns only columns and keys.
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": "pg_describe_table"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| table | Yes | ||
| detail | No | full | |
| connection | No |