show_catalogs
List all available catalogs in your Trino environment to discover connected data sources and databases.
Instructions
List all available catalogs
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |
Implementation Reference
- src/server.py:35-38 (handler)The MCP tool handler function 'show_catalogs' registered via @mcp.tool decorator. This is the entry point that gets called when the tool is invoked, delegating to client.list_catalogs().
@mcp.tool(description="List all available catalogs") def show_catalogs() -> str: """List all available catalogs.""" return client.list_catalogs() - src/trino_client.py:100-107 (helper)The helper method 'list_catalogs()' in TrinoClient class that executes the actual business logic: runs 'SHOW CATALOGS' SQL query and formats results as newline-separated string.
def list_catalogs(self) -> str: """List all available catalogs. Returns: str: Newline-separated list of catalog names. """ catalogs = [row["Catalog"] for row in json.loads(self.execute_query("SHOW CATALOGS"))] return "\n".join(catalogs) - src/server.py:35-35 (registration)The tool registration using @mcp.tool decorator with description 'List all available catalogs'. This registers the show_catalogs function as an MCP tool.
@mcp.tool(description="List all available catalogs")