Skip to main content
Glama
alaturqua

MCP Trino Server

by alaturqua

show_manifests

Display Iceberg table manifests to inspect data files, partitions, and snapshot metadata across Trino catalogs.

Instructions

Show Iceberg table manifests

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
catalogYescatalog name
schema_nameYesschema name
tableYesThe name of the table
all_snapshotsNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • The main handler function for the 'show_manifests' MCP tool. Decorated with @mcp.tool(), it accepts catalog, schema_name, table, and all_snapshots parameters with Field descriptions for validation. Delegates to client.show_manifests().
    @mcp.tool(description="Show Iceberg table manifests")
    def show_manifests(
        catalog: str = Field(description="catalog name"),
        schema_name: str = Field(description="schema name"),
        table: str = Field(description="The name of the table"),
        all_snapshots: bool = False,
    ) -> str:
        """Show Iceberg table manifests for current or all snapshots.
    
        The manifests table contains:
        - path: Manifest file location
        - length: Manifest file length
        - partition_spec_id: ID of partition spec used
        - added_snapshot_id: ID of snapshot when manifest was added
        - added_data_files_count: Number of data files with status ADDED
        - added_rows_count: Total rows in ADDED files
        - existing_data_files_count: Number of EXISTING files
        - existing_rows_count: Total rows in EXISTING files
        - deleted_data_files_count: Number of DELETED files
        - deleted_rows_count: Total rows in DELETED files
        - partition_summaries: Partition range metadata
    
        Args:
            catalog: catalog name
            schema_name: schema name
            table: The name of the table
            all_snapshots: If True, show manifests from all snapshots
    
        Returns:
            str: JSON-formatted table manifests
        """
        return client.show_manifests(catalog, schema_name, table, all_snapshots)
  • Input schema definition for the show_manifests tool using Pydantic Field descriptions. Defines catalog (str), schema_name (str), table (str), and all_snapshots (bool) parameters.
    @mcp.tool(description="Show Iceberg table manifests")
    def show_manifests(
        catalog: str = Field(description="catalog name"),
        schema_name: str = Field(description="schema name"),
        table: str = Field(description="The name of the table"),
        all_snapshots: bool = False,
    ) -> str:
  • The actual implementation of show_manifests in the TrinoClient class. Builds and executes a SQL query to fetch Iceberg table manifests from either 'manifests' or 'all_manifests' metadata tables. Handles catalog/schema defaults and validation.
    def show_manifests(self, table: str, catalog: str, schema: str, all_snapshots: bool = False) -> str:
        """Show Iceberg table manifests for current or all snapshots.
    
        The manifests table contains:
        - path: VARCHAR - Manifest file location
        - length: BIGINT - Manifest file length
        - partition_spec_id: INTEGER - ID of partition spec used
        - added_snapshot_id: BIGINT - ID of snapshot when manifest was added
        - added_data_files_count: INTEGER - Number of data files with status ADDED
        - added_rows_count: BIGINT - Total rows in ADDED files
        - existing_data_files_count: INTEGER - Number of EXISTING files
        - existing_rows_count: BIGINT - Total rows in EXISTING files
        - deleted_data_files_count: INTEGER - Number of DELETED files
        - deleted_rows_count: BIGINT - Total rows in DELETED files
        - partition_summaries: ARRAY(ROW(...)) - Partition range metadata
    
        Args:
            table: The name of the table
            catalog: Optional catalog name (defaults to configured catalog)
            schema: Optional schema name (defaults to configured schema)
            all_snapshots: If True, show manifests from all snapshots
    
        Returns:
            str: JSON-formatted string containing table manifests
        """
        catalog = catalog or self.config.catalog
        schema = schema or self.config.schema
        if not catalog or not schema:
            raise CatalogSchemaError
        table_type = "all_manifests" if all_snapshots else "manifests"
        query = 'SELECT * FROM "{}${}"'
        table_identifier = f"{catalog}.{schema}.{table}"
        return self.execute_query(query.format(table_identifier, table_type))
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure but offers almost nothing. It does not explain what manifests contain (lists of data files), how they relate to the all_snapshots parameter, performance characteristics, or whether this operation is read-only (implied by 'Show' but not explicit).

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

Conciseness3/5

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

The four-word description is appropriately front-loaded but excessively terse given the tool's complexity (4 parameters, output schema, numerous siblings). It wastes no words, but omits necessary context that would help an agent understand Iceberg-specific concepts.

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

Completeness2/5

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

Despite having an output schema (covering return values), the description is incomplete for the domain complexity. It fails to define 'manifests' in the Iceberg context (metadata files tracking data files), explain the relationship to snapshots, or clarify the tool's utility alongside the many sibling metadata inspection tools.

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

Parameters3/5

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

Schema description coverage is 75% (3 of 4 parameters described). The description adds no parameter-specific context, such as explaining that all_snapshots=false returns only the current snapshot's manifests, or clarifying the hierarchy of catalog > schema > table. Baseline score applies since schema does most of the work.

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 clearly identifies the action (Show) and resource (Iceberg table manifests), specifying the domain (Iceberg) which distinguishes it from generic table tools. However, it fails to differentiate from siblings like show_files, show_entries, or show_snapshots, leaving ambiguity about when to query manifests versus other metadata.

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?

No guidance is provided on when to use this tool versus alternatives like show_files or show_snapshots. The description does not mention prerequisites (e.g., table must exist) or suggest when manifest inspection is necessary (e.g., debugging, optimization).

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