Get Table Schema
getTableSchemaRetrieves column definitions and foreign key relationships for a specified table. Use to understand column names, data types, nullable, primary keys, defaults, and foreign keys before writing queries.
Instructions
Get column definitions and foreign key relationships for a table. Requires table — call listTables first.
<what_it_returns> A JSON object with table and columns keyed by column name, each containing type, nullable, key, default, and foreignKey info. </what_it_returns>
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| table | Yes | The table name to inspect. Use `listTables` first to see available tables. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| columns | Yes | Column definitions keyed by column name. | |
| table | Yes | Name of the inspected table. |