Skip to main content
Glama
Moonlight-CL

Redshift MCP Server

by Moonlight-CL

analyze_table

Collect and analyze statistics for specified tables in Amazon Redshift to optimize database performance and query execution efficiency.

Instructions

Analyze table to collect statistics information

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
schemaYesSchema name
tableYesTable name

Implementation Reference

  • Handles input validation for schema and table parameters and constructs the ANALYZE SQL statement.
    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}"
  • Returns a success message specific to the analyze_table tool after SQL execution, bypassing result fetching.
    if name == "analyze_table": return [TextContent(type="text", text=f"Successfully analyzed table {schema}.{table}")]
  • Registers the analyze_table tool with the MCP server, including description and input schema.
    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"] } ),
  • Defines the input schema for the analyze_table tool, specifying required schema and table parameters.
    inputSchema={ "type": "object", "properties": { "schema": { "type": "string", "description": "Schema name" }, "table": { "type": "string", "description": "Table name" } }, "required": ["schema", "table"] }

Other Tools

Related 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