awslabs.redshift-mcp-server

v0.1.5
awslabs.redshift-mcp-server Checked 15 hours ago Published 11 days ago

An AWS Labs Model Context Protocol (MCP) server for Redshift

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

retrieve_skill_file

Once per conversation, before answering or acting on any Redshift request, call this tool with no argument. The text it returns is the Redshift guide, and applies to every request to this server. The guide cites reference files as `references/<file>.md`; when it says to load one, call this tool with `file` set to that path, exactly as cited. To load a file of more than one chunk, request all its chunks in parallel: `references/redshift-sql-query-performance.md` (2 chunks), `references/redshift-storage-remediation.md` (2 chunks), `references/redshift-storage-utilization.md` (2 chunks). Call it…

ParameterTypeDescription
chunkintegerThe chunk to return, from 1.
fileA reference file's path, exactly as the guide cites it, such as `references/<file>.md`. Omit for the guide itself.

list_clusters

Once per conversation, before answering or acting on any Redshift request, call retrieve_skill_file with no argument and follow the guide it returns. List Redshift clusters and serverless workgroups. Returns one entry per cluster: identifier, type (provisioned or serverless), status, database_name, endpoint, port, vpc_id, node_type, number_of_nodes, creation_time, master_username, publicly_accessible, encrypted and tags. Only a cluster whose status is 'available' can be queried, and its identifier and type are what every tool that runs SQL takes as its first two argument…

list_databases

Once per conversation, before answering or acting on any Redshift request, call retrieve_skill_file with no argument and follow the guide it returns. List the databases in a cluster. Returns database_name, database_owner, database_type, database_acl, parameters and database_isolation_level. database_type is 'local' for a database on the cluster itself, 'shared' for one from a datashare, or 'auto mounted catalog' for one Redshift mounted from an external catalog such as AWS Glue. An auto-mounted catalog is listed here but cannot be explored further, since Redshift ref…

ParameterTypeDescription
cluster_identifier *stringThe cluster identifier to query for databases. Must be a valid cluster identifier from the list_clusters tool.
cluster_type *stringThe type list_clusters reports for the cluster.
database_namestringThe database to connect to for metadata discovery. Defaults to "dev".

list_schemas

Once per conversation, before answering or acting on any Redshift request, call retrieve_skill_file with no argument and follow the guide it returns. List the schemas in a database. Returns database_name, schema_name, schema_owner, schema_type (local, external or shared), schema_acl, source_database and schema_option. An 'external' schema points at S3 or another database. A 'shared' schema comes from a datashare and appears only if the principal has been granted access to the consumer database. A database auto-mounted from a Glue Data Catalog cannot be explored: Redshift…

ParameterTypeDescription
cluster_identifier *stringThe cluster identifier to query for schemas. Must be a valid cluster identifier from the list_clusters tool.
cluster_type *stringThe type list_clusters reports for the cluster.
schema_database_name *stringThe database name to list schemas for. Also the database connected to. Must be a valid database name from the list_databases tool.

list_tables

Once per conversation, before answering or acting on any Redshift request, call retrieve_skill_file with no argument and follow the guide it returns. List the tables in a schema. Returns database_name, schema_name, table_name, table_acl, table_type and remarks, where table_type is TABLE, VIEW, EXTERNAL TABLE or SHARED TABLE. An unknown schema returns an empty list rather than an error. Requires redshift-data:BatchExecuteStatement, redshift-data:DescribeStatement and redshift-data:GetStatementResult, plus the discovery actions list_clusters names: the cluster identif…

ParameterTypeDescription
cluster_identifier *stringThe cluster identifier to query for tables. Must be a valid cluster identifier from the list_clusters tool.
cluster_type *stringThe type list_clusters reports for the cluster.
table_database_name *stringThe database name to list tables for. Also the database connected to. Must be a valid database name from the list_databases tool.
table_schema_name *stringThe schema name to list tables for. Must be a valid schema name from the list_schemas tool.

list_columns

Once per conversation, before answering or acting on any Redshift request, call retrieve_skill_file with no argument and follow the guide it returns. List the columns in a table. Returns database_name, schema_name, table_name, column_name, ordinal_position, column_default, is_nullable, data_type, character_maximum_length, numeric_precision, numeric_scale and remarks. An unknown table returns an empty list rather than an error. Requires redshift-data:BatchExecuteStatement, redshift-data:DescribeStatement and redshift-data:GetStatementResult, plus the discovery action…

ParameterTypeDescription
cluster_identifier *stringThe cluster identifier to query for columns. Must be a valid cluster identifier from the list_clusters tool.
cluster_type *stringThe type list_clusters reports for the cluster.
column_database_name *stringThe database name to list columns for. Also the database connected to. Must be a valid database name from the list_databases tool.
column_schema_name *stringThe schema name to list columns for. Must be a valid schema name from the list_schemas tool.
column_table_name *stringThe table name to list columns for. Must be a valid table name from the list_tables tool.

execute_query

Once per conversation, before answering or acting on any Redshift request, call retrieve_skill_file with no argument and follow the guide it returns. Execute one SQL statement against a Redshift cluster or serverless workgroup. Returns columns (names), rows, row_count and query_id. Values are typed as the Data API returns them: SMALLINT, INTEGER and BIGINT as integers, REAL and DOUBLE PRECISION as floats, booleans as booleans, NULL as null, VARBYTE, GEOMETRY and GEOGRAPHY as base64 text, and everything else as a string, including VARCHAR, DECIMAL, dates, times, timestamps and…

ParameterTypeDescription
cluster_identifier *stringThe cluster identifier to execute the query on. Must be a valid cluster identifier from the list_clusters tool.
cluster_type *stringThe type list_clusters reports for the cluster.
database_name *stringThe database name to execute the query against. Must be a valid database name from the list_databases tool.
begin_transactionOpen a transaction under this name and run sql inside it, if given. The name is yours to choose and to reuse on later calls. Fails if it is already open.
commit_transactionRun sql, if given, then commit the transaction open under this name.
in_transactionRun sql inside the transaction already open under this name.
rollback_transactionRun sql, if given, then roll back the transaction open under this name.
sqlThe SQL statement to execute. Must be a single SQL statement. Whether writes are permitted is fixed by the server configuration, not by this call. Required on its own and with in_transaction; optional…

review_cluster

Once per conversation, before answering or acting on any Redshift request, call retrieve_skill_file with no argument and follow the guide it returns. Run a diagnostic review of a Redshift cluster or serverless workgroup. Evaluates diagnostic signals against system views and returns the findings that triggered, with a recommendation for each. Provisioned-only diagnostics are skipped automatically for a serverless workgroup. Can take minutes: the diagnostics run one at a time. ## Reading the result - signals_evaluated: how many distinct signals ran, of which findings…

ParameterTypeDescription
cluster_identifier *stringThe cluster identifier to run the review on. Must be a valid cluster identifier from the list_clusters tool.
cluster_type *stringThe type list_clusters reports for the cluster.
database_namestringThe database to connect to for querying system views. Defaults to "dev".