Skip to main content
Glama
santosh07401

Redshift MCP Server

by santosh07401

redshift_describe_table

Retrieve column definitions and structure details for Amazon Redshift database tables to understand data schema and relationships.

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
NameRequiredDescriptionDefault
table_nameYes
schemaNopublic

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • The handler function for the 'redshift_describe_table' tool. It is registered via the @mcp.tool() decorator and executes a SQL query against information_schema.columns to describe the table structure, returning JSON via redshift_query.
    @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)
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of behavioral disclosure. It states the tool returns a JSON description of columns, which is helpful, but lacks details on error handling (e.g., what happens if the table doesn't exist), performance characteristics, or authentication requirements. This is a significant gap for a tool that interacts with a database.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is appropriately concise and well-structured with clear sections for Args and Returns. Each sentence serves a purpose, though it could be more front-loaded by moving the return statement closer to the purpose. There's no wasted text.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's moderate complexity (database metadata retrieval) and the presence of an output schema, the description is minimally adequate. However, with no annotations and low parameter semantics, it fails to fully address behavioral aspects like error conditions or usage context, leaving gaps for an AI agent.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The description adds minimal semantic context beyond the input schema, which has 0% description coverage. It clarifies that 'schema' defaults to 'public', but doesn't explain what a schema is in Redshift context or provide examples. For a tool with 2 parameters, this is inadequate, though the output schema might mitigate some gaps.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose with a specific verb ('Get') and resource ('column definitions for a table'), making it easy to understand what it does. However, it doesn't explicitly differentiate from sibling tools like 'redshift_list_tables' or 'redshift_query', which might also provide table information in different ways.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives like 'redshift_list_tables' (which lists tables) or 'redshift_query' (which might return column info as part of query results). There's no mention of prerequisites, such as needing an active Redshift connection, or typical use cases like schema exploration.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/santosh07401/redshift-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server