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"] } ),

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