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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to