You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@gravitino.apache.org by "bharos (via GitHub)" <gi...@apache.org> on 2026/08/05 06:19:46 UTC
[PR] [#12371] feat(mcp-server): write tools for views [gravitino]
bharos opened a new pull request, #12372:
URL: https://github.com/apache/gravitino/pull/12372
### What changes were proposed in this pull request?
Add `create_view`, `alter_view` and `drop_view` MCP tools, following the existing
pattern: `ViewOperation` interface -> `PlainRESTClientViewOperation` -> FastMCP
tools in `tools/view.py`, plus mock and unit tests. They call the existing
`ViewOperations` REST endpoints, so no server-side change is needed. The tool
table in `docs/gravitino-mcp-server.md` is updated.
### Why are the changes needed?
View is the only schema-level entity in the MCP server with read tools but no
write tools: catalog, schema, table and fileset have create/alter/drop, and
topic, model and tag have their equivalents. #12129 added `list_of_views` and
`load_view` and left the write side as a follow-up.
Fix: #12371
### Does this PR introduce _any_ user-facing change?
Yes, three new MCP tools. They carry the existing `view` tag, so
`--include-tool-tags view` picks them up. No new configuration.
### How was this patch tested?
Unit tests: 3 tool tests plus 3 client tests covering URL encoding of the view
name, omission of unset `default_catalog`/`default_schema`, and the `dropped`
response key. Full suite is 173 tests; isort, black and pylint (10.00/10) clean.
End to end against a local Gravitino with a `lakehouse-iceberg` catalog (JDBC
backend), driving the MCP server over `streamable-http` with a real client:
create (both with and without the optional defaults) -> `list_of_views` ->
`alter_view` with `setProperty` and `rename` -> `load_view` -> `drop_view`.
`drop_view` returns `true` for an existing view and `false` for a missing one,
and a create with empty `representations` surfaces the server's validation
error as a tool error. Full results are recorded in
https://github.com/apache/gravitino/issues/12371#issuecomment-5188274936
--
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: commits-unsubscribe@gravitino.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [#12371] feat(mcp-server): write tools for views [gravitino]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #12372:
URL: https://github.com/apache/gravitino/pull/12372#issuecomment-5190443233
<!-- coverage-report -->
### Code Coverage Report
|Overall Project|68.17%|:green_circle:|
|:-|:-|:-:|
|Files changed|No Java source files changed|-|
<br>
|Module|Coverage||
|:-|:-|:-:|
|aliyun|1.72%|:red_circle:|
|api|49.34%|:green_circle:|
|authorization-common|85.96%|:green_circle:|
|aws|42.04%|:green_circle:|
|azure|2.47%|:red_circle:|
|catalog-common|9.92%|:red_circle:|
|catalog-fileset|79.74%|:green_circle:|
|catalog-glue|68.95%|:green_circle:|
|catalog-hive|79.4%|:green_circle:|
|catalog-jdbc-common|45.7%|:green_circle:|
|catalog-jdbc-doris|81.8%|:green_circle:|
|catalog-jdbc-mysql|79.33%|:green_circle:|
|catalog-jdbc-postgresql|83.39%|:green_circle:|
|catalog-jdbc-starrocks|79.16%|:green_circle:|
|catalog-kafka|77.01%|:green_circle:|
|catalog-lakehouse-generic|59.18%|:green_circle:|
|catalog-lakehouse-hudi|79.1%|:green_circle:|
|catalog-lakehouse-iceberg|85.86%|:green_circle:|
|catalog-lakehouse-paimon|84.23%|:green_circle:|
|catalog-model|77.72%|:green_circle:|
|cli|44.48%|:green_circle:|
|client-java|78.27%|:green_circle:|
|common|52.13%|:green_circle:|
|core|83.22%|:green_circle:|
|filesystem-hadoop3|77.28%|:green_circle:|
|flink|0.0%|:red_circle:|
|flink-common|48.68%|:green_circle:|
|flink-runtime|0.0%|:red_circle:|
|gcp|14.12%|:red_circle:|
|hadoop-auth|68.0%|:green_circle:|
|hadoop-common|12.7%|:red_circle:|
|hive-metastore-common|53.4%|:green_circle:|
|iceberg-common|64.75%|:green_circle:|
|iceberg-rest-server|75.03%|:green_circle:|
|idp-basic|86.02%|:green_circle:|
|integration-test-common|0.0%|:red_circle:|
|jobs|62.92%|:green_circle:|
|lance-common|24.5%|:red_circle:|
|lance-rest-server|64.23%|:green_circle:|
|lineage|53.02%|:green_circle:|
|optimizer|83.24%|:green_circle:|
|optimizer-api|21.95%|:red_circle:|
|server|85.76%|:green_circle:|
|server-common|76.45%|:green_circle:|
|spark|28.57%|:red_circle:|
|spark-common|45.89%|:green_circle:|
|tencent|69.84%|:green_circle:|
|trino-connector|40.29%|:green_circle:|
--
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: commits-unsubscribe@gravitino.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [#12371] feat(mcp-server): write tools for views [gravitino]
Posted by "bharos (via GitHub)" <gi...@apache.org>.
bharos commented on PR #12372:
URL: https://github.com/apache/gravitino/pull/12372#issuecomment-5246895151
> @bharos Hi, [bharos](https://github.com/bharos), is this feature needed by your business? In principle, we need to be careful with write operations because MCP servers generally do not handle modification operations, so I also blocked a write PR raised long ago
Got it, I Thought we were supporting write operations as well. No, I don't have any immediate need. We can wait on this PR until we decide to support write tools
--
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: commits-unsubscribe@gravitino.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [#12371] feat(mcp-server): write tools for views [gravitino]
Posted by "yuqi1129 (via GitHub)" <gi...@apache.org>.
yuqi1129 commented on PR #12372:
URL: https://github.com/apache/gravitino/pull/12372#issuecomment-5230050138
@bharos
Hi, [bharos](https://github.com/bharos), is this feature needed by your business? In principle, we need to be careful with write operations because MCP servers generally do not handle modification operations, so I also blocked a write PR raised long ago
--
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: commits-unsubscribe@gravitino.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org