Skip to main content
Glama
alaturqua

MCP Trino Server

by alaturqua

show_catalogs

List all available catalogs in your Trino environment to discover connected data sources and databases.

Instructions

List all available catalogs

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • 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()
  • 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")
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden. The verb 'List' implies a read-only operation, but the description does not explicitly confirm safety, idempotency, or performance characteristics (e.g., whether 'all' catalogs implies potential latency in large environments).

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The single sentence 'List all available catalogs' is appropriately sized for a zero-parameter tool. It is front-loaded with the action verb and contains no redundant or wasteful text.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool has zero parameters and an output schema exists (covering return values), the description is nearly sufficient. It could be improved by noting this is the root-level metadata discovery tool, but it adequately covers the basic contract.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema has zero parameters, which per guidelines establishes a baseline of 4. The description appropriately implies no filtering capabilities by stating 'all' catalogs, matching the empty parameter schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description uses a specific verb ('List') and resource ('available catalogs') that clearly identifies the tool's function. However, it does not differentiate from the sibling tool 'show_catalog_tree', which likely displays hierarchical catalog structure versus this flat listing.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives like 'show_catalog_tree' or 'show_schemas'. It does not indicate that this is typically the first step in metadata exploration before drilling down into schemas and tables.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other 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/alaturqua/mcp-trino-python'

If you have feedback or need assistance with the MCP directory API, please join our Discord server