Skip to main content
Glama
alaturqua

MCP Trino Server

by alaturqua

show_entries

Retrieve Iceberg table manifest entries to analyze file metadata and snapshot history for data lake management and optimization.

Instructions

Show Iceberg table manifest entries

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

  • MCP tool handler function 'show_entries' decorated with @mcp.tool(). Defines the tool interface with parameters (catalog, schema_name, table, all_snapshots) using Pydantic Field for schema validation, includes detailed docstring explaining the entries table structure, and delegates to client.show_entries().
    @mcp.tool(description="Show Iceberg table manifest entries")
    def show_entries(
        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 manifest entries for current or all snapshots.
    
        The entries table contains:
        - status: Status of entry (0=EXISTING, 1=ADDED, 2=DELETED)
        - snapshot_id: ID of the snapshot
        - sequence_number: Data sequence number
        - file_sequence_number: File sequence number
        - data_file: File metadata including path, format, size etc
        - readable_metrics: Human-readable file metrics
    
        Args:
            catalog: catalog name
            schema_name: schema name
            table: The name of the table
            all_snapshots: If True, show entries from all snapshots
    
        Returns:
            str: JSON-formatted manifest entries
        """
        return client.show_entries(catalog, schema_name, table, all_snapshots)
  • Input schema defined via Pydantic Field() parameters: catalog (str), schema_name (str), table (str), all_snapshots (bool). These define the tool's input validation and JSON schema for MCP.
    @mcp.tool(description="Show Iceberg table manifest entries")
    def show_entries(
        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:
  • TrinoClient.show_entries() method - the core implementation that builds and executes the SQL query to retrieve Iceberg table manifest entries. Constructs table name with optional '$all_entries' suffix for all snapshots, validates catalog/schema, and executes query via execute_query().
    def show_entries(self, table: str, catalog: str, schema: str, all_snapshots: bool = False) -> str:
        """Show Iceberg table manifest entries for current or all snapshots.
    
        The entries table contains:
        - status: INTEGER - Status of entry (0=EXISTING, 1=ADDED, 2=DELETED)
        - snapshot_id: BIGINT - ID of the snapshot
        - sequence_number: BIGINT - Data sequence number
        - file_sequence_number: BIGINT - File sequence number
        - data_file: ROW(...) - File metadata including path, format, size etc
        - readable_metrics: JSON - Human-readable file metrics
    
        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 entries from all snapshots
    
        Returns:
            str: JSON-formatted string containing manifest entries
        """
        catalog = catalog or self.config.catalog
        schema = schema or self.config.schema
        if not catalog or not schema:
            raise CatalogSchemaError
        table_name = f"{catalog}.{schema}.{table}${'all_' if all_snapshots else ''}entries"
        query = 'SELECT * FROM "{}"'
        return self.execute_query(query.format(table_name))
Behavior2/5

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

No annotations provided, so description carries full burden. It does not explain what manifest entries represent (data file metadata), whether this is read-only, or the format of returned entries despite having an output schema. The snapshot filtering behavior is undisclosed.

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

Conciseness4/5

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

Extremely terse at 4 words with no filler. However, the brevity comes at the cost of necessary context; it is front-loaded but under-specified rather than efficiently informative.

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?

Given the complexity of Iceberg metadata hierarchies (catalogs → tables → manifests → entries → files) and the presence of numerous sibling inspection tools, the description lacks sufficient domain context to guide correct tool selection.

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 coverage is 75% (3 of 4 params described). The description adds context that these are 'Iceberg' tables, but does not explain the 'all_snapshots' boolean or add semantic detail beyond the schema's basic field labels.

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

Purpose3/5

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

The description identifies the specific resource ('Iceberg table manifest entries') but uses the weak verb 'Show' instead of 'List' or 'Get'. It fails to distinguish from sibling tool 'show_manifests', which creates ambiguity about whether this returns manifest files or the entries within them.

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 provided on when to use this versus 'show_manifests', 'show_files', or 'show_snapshots'. The 'all_snapshots' parameter behavior is undocumented (e.g., what happens when false vs true).

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