show_catalogs
Retrieve a list of all available catalogs in Trino to identify data sources for querying.
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 for 'show_catalogs'. Decorated with @mcp.tool, it delegates 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 TrinoClient.list_catalogs() method that executes 'SHOW CATALOGS' query and returns newline-separated catalog names.
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 is registered via the @mcp.tool decorator on the show_catalogs function, with description 'List all available catalogs'.
@mcp.tool(description="List all available catalogs")