get_table_schema
Retrieves a table's columns, types, primary and foreign keys, and optional indexes so you can write correct filters or JOINs and inspect what is indexed.
Instructions
Get columns, types, and primary/foreign keys for a table.
Pass include_indexes=true to also get the table's indexes (name, its KEY columns in index order — an INCLUDE payload is not listed — whether it is unique, and its method: btree, gin, ...). Use it before writing a filter or a JOIN, or when a query is slow and you want to know what is actually indexed. Omitted by default, so the plain answer stays small.
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": {
"database": "<database>",
"table": "<table>"
},
"name": "get_table_schema"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| table | Yes | ||
| database | Yes | ||
| include_indexes | No |