Get Table Schema
getTableSchemaRetrieve column definitions and foreign key relationships for a specified table to understand its structure 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>
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": "getTableSchema"
}
}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 |
|---|---|---|---|
| table | Yes | Name of the inspected table. | |
| columns | Yes | Column definitions keyed by column name. |