Skip to main content
Glama
DeepaRajareddy

Redshift MCP Server

redshift_get_sample_data

Retrieve sample rows from a Redshift table to preview data structure and content before querying.

Instructions

Get sample rows from a table.

Args:
    table_name: Name of the table
    limit: Number of rows to return (default: 5)
    schema: Schema name (default: "public")

Returns:
    JSON sample data

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
table_nameYes
limitNo
schemaNopublic

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • The main handler function for the 'redshift_get_sample_data' tool. It is decorated with @mcp.tool() which serves as both the implementation and registration in FastMCP. The function generates a SQL query to fetch a limited number of rows from the specified table and delegates execution to the 'redshift_query' tool, returning JSON results.
    @mcp.tool()
    def redshift_get_sample_data(table_name: str, limit: int = 5, schema: str = "public") -> str:
        """
        Get sample rows from a table.
        
        Args:
            table_name: Name of the table
            limit: Number of rows to return (default: 5)
            schema: Schema name (default: "public")
        
        Returns:
            JSON sample data
        """
        sql = f"SELECT * FROM {schema}.{table_name} LIMIT {limit}"
        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 mentions the tool 'Get sample rows' and returns 'JSON sample data,' but fails to disclose critical traits such as whether it requires specific permissions, if it's read-only or has side effects, potential rate limits, or error handling. For a data retrieval tool with zero annotation coverage, this is a significant gap in transparency.

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 sized and front-loaded, starting with the core purpose in the first sentence. The structured 'Args' and 'Returns' sections make it easy to scan, though the 'Returns' section is minimal ('JSON sample data'). There's no wasted text, but it could be slightly more informative without losing conciseness.

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 (3 parameters, 1 required) and the presence of an output schema (which handles return values), the description is somewhat complete but has gaps. It covers the basic purpose and parameters but lacks usage guidelines and behavioral details. With no annotations and an output schema, it's adequate for a simple read operation but could be more comprehensive for effective agent use.

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 some meaning beyond the input schema by explaining parameters in the 'Args' section: 'table_name: Name of the table,' 'limit: Number of rows to return (default: 5),' and 'schema: Schema name (default: "public").' However, with 0% schema description coverage, the schema itself lacks descriptions, so the description compensates partially but doesn't provide deep semantic context like format constraints or examples. This meets the baseline for moderate value addition.

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: 'Get sample rows from a table.' It specifies the verb ('Get') and resource ('sample rows from a table'), making it easy to understand what the tool does. However, it doesn't explicitly differentiate from sibling tools like 'redshift_query' (which might also retrieve data) or 'redshift_describe_table' (which provides metadata), so it falls short of a perfect score.

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. It doesn't mention sibling tools like 'redshift_query' for more complex queries or 'redshift_describe_table' for schema details, nor does it specify prerequisites or exclusions. This lack of context leaves the agent to infer usage based on the name alone.

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/DeepaRajareddy/redshift_mcp_server'

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