bharos opened a new pull request, #12128:
URL: https://github.com/apache/gravitino/pull/12128
### 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
partition
names by default, or full partition metadata when `details=true`.
- `get_partition(catalog, schema, table, partition)` — returns the metadata
of a
single 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 requires
partition 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`), tagged
`partition`.
### 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); `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]