get_table_history
View change history for Delta tables to track modifications, analyze version changes, and monitor table evolution over time.
Instructions
View Delta table change history (DESCRIBE HISTORY)
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| catalog | Yes | ||
| schema | Yes | ||
| table | Yes | ||
| limit | No |
Implementation Reference
- tools/delta.py:10-16 (handler)The get_table_history tool is defined and registered using the @mcp.tool decorator in tools/delta.py. It executes a SQL DESCRIBE HISTORY statement to fetch the table's change history.
@mcp.tool def get_table_history(ctx: Context, catalog: str, schema: str, table: str, limit: int = 10) -> List[Dict[str, Any]]: """View Delta table change history (DESCRIBE HISTORY)""" cat = safe_identifier(catalog, "catalog") sch = safe_identifier(schema, "schema") tbl = safe_identifier(table, "table") return execute_sql(ctx, f"DESCRIBE HISTORY {cat}.{sch}.{tbl} LIMIT {limit}")