redshift_describe_table
Retrieve column definitions and structure for Amazon Redshift tables to understand data types and schema organization.
Instructions
Get the column definitions for a table.
Args:
table_name: Name of the table
schema: Schema name (default: "public")
Returns:
JSON description of columns
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| table_name | Yes | ||
| schema | No | public |
Implementation Reference
- redshift_mcp_server.py:96-115 (handler)The core handler function for the 'redshift_describe_table' MCP tool. It is registered via the @mcp.tool() decorator. The function builds a SQL query to retrieve column metadata from the information_schema and delegates execution to the 'redshift_query' tool, returning the JSON results.@mcp.tool() def redshift_describe_table(table_name: str, schema: str = "public") -> str: """ Get the column definitions for a table. Args: table_name: Name of the table schema: Schema name (default: "public") Returns: JSON description of columns """ sql = f""" SELECT column_name, data_type, is_nullable, column_default FROM information_schema.columns WHERE table_schema = '{schema}' AND table_name = '{table_name}' ORDER BY ordinal_position """ return redshift_query(sql)