[#12099] feat(mcp-server): add read tools for table partitions#12128
Open
bharos wants to merge 1 commit into
Open
[#12099] feat(mcp-server): add read tools for table partitions#12128bharos wants to merge 1 commit into
bharos wants to merge 1 commit into
Conversation
Code Coverage Report
|
bharos
force-pushed
the
add-mcp-partition-read-tools-12099
branch
3 times, most recently
from
July 22, 2026 04:00
f4b28f1 to
90915f0
Compare
bharos
force-pushed
the
add-mcp-partition-read-tools-12099
branch
from
July 22, 2026 04:02
90915f0 to
7355e05
Compare
bharos
marked this pull request as ready for review
July 22, 2026 04:09
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 table partitions:
list_of_partitions(catalog, schema, table, details=false)— returns partitionnames by default, or full partition metadata when
details=true.get_partition(catalog, schema, table, partition)— returns the metadata of asingle partition.
They follow the existing metadata-type pattern (interface → plain REST client →
FastMCP tool → factory wiring → mock + unit tests). All user-supplied path
segments are URL-encoded, and authorization is enforced by Gravitino
(
LOAD_TABLE), so no filtering logic is added in the MCP layer.Why are the changes needed?
The server already exposes
list_statistics_for_partition, which requirespartition names as input, but there was no tool to discover those names. These
tools close that gap and round out read coverage for partitioned tables.
Fix: #12099
Does this PR introduce any user-facing change?
Yes — two new MCP tools (
list_of_partitions,get_partition), taggedpartition.How was this patch tested?
Added unit tests for the tools (
test_partition.py) and for URL-encoding /query-param handling (
test_url_encoding.py). Full unit suite passes(163 tests);
blackandpylint(10/10) are clean.