[#12129] feat(mcp-server): add read tools for views#12130
Draft
bharos wants to merge 1 commit into
Draft
Conversation
Code Coverage Report
|
bharos
force-pushed
the
add-mcp-view-read-tools-12129
branch
from
July 22, 2026 04:45
8e14177 to
92dc7cf
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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-icebergcatalogs (
IcebergCatalog.asViewCatalog()), so this is useful for Icebergdeployments too.
Fix: #12129
Does this PR introduce any user-facing change?
Yes — two new MCP tools (
list_of_views,load_view), taggedview.How was this patch tested?
Added unit tests for the tools (
test_view.py) and for URL-encoding of the viewendpoints (
test_url_encoding.py). Full unit suite passes (161 tests);blackand
pylint(10/10) are clean.