Skip to main content
Glama
alaturqua

MCP Trino Server

by alaturqua

show_table_history

Retrieve the change history of an Iceberg table using its catalog, schema, and name.

Instructions

Show Iceberg table history/changelog

Input Schema

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

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • MCP tool handler function 'show_table_history' registered with @mcp.tool decorator. Accepts catalog, schema_name, and table parameters, delegates to client.show_table_history().
    @mcp.tool(description="Show Iceberg table history/changelog")
    def show_table_history(
        catalog: str = Field(description="catalog name "),
        schema_name: str = Field(description="schema name "),
        table: str = Field(description="The name of the table"),
    ) -> str:
        """Show Iceberg table history/changelog.
    
        The history contains:
        - made_current_at: When snapshot became active
        - snapshot_id: Identifier of the snapshot
        - parent_id: Identifier of the parent snapshot
        - is_current_ancestor: Whether snapshot is an ancestor of current
    
        Args:
            catalog: catalog name
            schema_name: schema name
            table: The name of the table
    
        Returns:
            str: JSON-formatted table history
        """
        return client.show_table_history(catalog, schema_name, table)
  • src/server.py:266-288 (registration)
    Tool registered via @mcp.tool(description='Show Iceberg table history/changelog') decorator on line 266.
    @mcp.tool(description="Show Iceberg table history/changelog")
    def show_table_history(
        catalog: str = Field(description="catalog name "),
        schema_name: str = Field(description="schema name "),
        table: str = Field(description="The name of the table"),
    ) -> str:
        """Show Iceberg table history/changelog.
    
        The history contains:
        - made_current_at: When snapshot became active
        - snapshot_id: Identifier of the snapshot
        - parent_id: Identifier of the parent snapshot
        - is_current_ancestor: Whether snapshot is an ancestor of current
    
        Args:
            catalog: catalog name
            schema_name: schema name
            table: The name of the table
    
        Returns:
            str: JSON-formatted table history
        """
        return client.show_table_history(catalog, schema_name, table)
  • Client method that executes the Iceberg table history query: 'SELECT * FROM "{catalog}.{schema}.{table}$history"' against Trino, returning JSON-formatted results.
    def show_table_history(self, table: str, catalog: str, schema: str) -> str:
        """Show Iceberg table history/changelog.
    
        The history contains:
        - made_current_at: TIMESTAMP(3) WITH TIME ZONE - Time when snapshot became active
        - snapshot_id: BIGINT - Identifier of the snapshot
        - parent_id: BIGINT - Identifier of the parent snapshot
        - is_current_ancestor: BOOLEAN - Whether this snapshot is an ancestor of current
    
        Args:
            table: The name of the table
            catalog: Optional catalog name (defaults to configured catalog)
            schema: Optional schema name (defaults to configured schema)
    
        Returns:
            str: JSON-formatted string containing table history
        """
        catalog = catalog or self.config.catalog
        schema = schema or self.config.schema
        if not catalog or not schema:
            raise CatalogSchemaError
        table_identifier = f"{catalog}.{schema}.{table}"
        query = 'SELECT * FROM "{}$history"'
        return self.execute_query(query.format(table_identifier))
Behavior2/5

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

No annotations are provided, so the description must carry the full burden of behavioral disclosure. It does not mention read-only nature, data volume, authentication needs, or any side effects, which is insufficient for a tool with no annotations.

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?

The description is very concise with a single sentence. It is front-loaded and contains no fluff, but could be slightly more informative without sacrificing conciseness.

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 presence of an output schema and many sibling tools, the description is too minimal. It does not explain what the history/changelog contains (e.g., operations, timestamps), which is needed for full understanding.

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 100% with clear parameter descriptions (catalog, schema_name, table). The description adds no extra meaning beyond the schema, so baseline 3 is appropriate.

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 states 'Show Iceberg table history/changelog', providing a specific verb and resource. It distinguishes from siblings like 'show_snapshots' and 'show_metadata_log_entries' by mentioning 'history/changelog', but could be more precise about what fields are included.

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 on when to use this tool versus alternatives. Among many similar 'show_*' siblings, the description does not specify scenarios or exclusions, leaving the agent to infer usage.

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