Skip to main content
Glama
Moonlight-CL

Redshift MCP Server

by Moonlight-CL

analyze_table

Collect statistics information from Amazon Redshift tables to optimize query performance and database efficiency.

Instructions

Analyze table to collect statistics information

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
schemaYesSchema name
tableYesTable name

Implementation Reference

  • Validates the 'schema' and 'table' parameters and constructs the ANALYZE SQL statement for the analyze_table tool.
    elif name == "analyze_table":
        schema = args.get("schema")
        table = args.get("table")
        if not all([schema, table]):
            raise ValueError("'schema' and 'table' parameters are required when calling analyze_table tool")
        sql = f"ANALYZE {schema}.{table}"
  • Executes the constructed SQL using the database connection and returns a success message specific to the analyze_table tool.
    with conn.cursor() as cursor:
        cursor.execute(sql)
        if name == "analyze_table":
            return [TextContent(type="text", text=f"Successfully analyzed table {schema}.{table}")]
  • Defines the input schema, description, and registration of the analyze_table tool in the list_tools function.
    Tool(
        name="analyze_table",
        description="Analyze table to collect statistics information",
        inputSchema={
            "type": "object",
            "properties": {
                "schema": {
                    "type": "string",
                    "description": "Schema name"
                },
                "table": {
                    "type": "string",
                    "description": "Table name"
                }
            },
            "required": ["schema", "table"]
        }
    ),
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. The description mentions 'collect statistics information' but doesn't specify what statistics are collected (e.g., row count, column distributions, indexes), whether this is a read-only operation, performance implications, or output format. For a tool with no annotation coverage, this leaves critical behavioral traits undocumented, though it doesn't contradict any annotations.

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 a single, efficient sentence: 'Analyze table to collect statistics information'. It's front-loaded with the core action and outcome, with no wasted words. While it could be more detailed for better tool selection, it's appropriately concise for its length, earning a high score for structure and brevity.

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

Completeness2/5

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

Given the tool's complexity (analysis operation with 2 parameters), lack of annotations, and no output schema, the description is incomplete. It doesn't explain what 'statistics information' entails, how results are returned, or behavioral aspects like performance. With no structured fields to compensate, the description should provide more context to ensure the agent can use the tool effectively, but it falls short.

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 input schema has 100% description coverage, with clear documentation for 'schema' and 'table' parameters. The description doesn't add any parameter-specific semantics beyond what the schema provides, such as examples or constraints. However, with high schema coverage, the baseline score is 3, as the schema adequately documents parameters without needing extra description details.

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

Purpose3/5

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

The description states the tool's purpose as 'Analyze table to collect statistics information', which provides a clear verb ('analyze') and resource ('table') with a general outcome ('collect statistics information'). However, it doesn't differentiate from sibling tools like 'execute_sql' or 'get_execution_plan', leaving ambiguity about when to use this specific analysis tool versus executing SQL queries directly. The purpose is understandable but lacks specificity for tool selection.

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 'execute_sql' or 'get_execution_plan', nor does it specify contexts where table analysis is preferred over direct SQL execution or plan retrieval. Without any usage context or exclusions, the agent must infer when this tool is appropriate, which could lead to incorrect tool selection.

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/Moonlight-CL/redshift-mcp-server'

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