bharos opened a new pull request, #12130:
URL: https://github.com/apache/gravitino/pull/12130
### What changes were proposed in this pull request?
Add two read-only MCP tools for views:
- `list_of_views(catalog, schema)` — lists the views in a schema.
- `load_view(catalog, schema, view)` — returns the full metadata of a view
(columns, SQL representations, default catalog/schema, properties, audit).
They follow the existing metadata-type pattern (interface → plain REST
client →
FastMCP tool → mock + unit tests). All user-supplied path segments are
URL-encoded, and authorization is enforced by Gravitino, so no filtering
logic is
added in the MCP layer.
### Why are the changes needed?
Views round out read coverage for relational catalogs. Unlike partitions
(Hive-only), views are supported by both the Hive and the `lakehouse-iceberg`
catalogs (`IcebergCatalog.asViewCatalog()`), so this is useful for Iceberg
deployments too.
Fix: #12129
### Does this PR introduce _any_ user-facing change?
Yes — two new MCP tools (`list_of_views`, `load_view`), tagged `view`.
### How was this patch tested?
Added unit tests for the tools (`test_view.py`) and for URL-encoding of the
view
endpoints (`test_url_encoding.py`). Full unit suite passes (161 tests);
`black`
and `pylint` (10/10) are clean.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]