yuqi1129 opened a new issue, #13120:
URL: https://github.com/apache/gravitino/issues/13120

   ### Version
   
   main branch
   
   ### Describe what's wrong
   
   The MCP tool `list_tags_for_metadata` silently returns `[]` for metadata 
objects that have associated tags.
   
   `PlainRESTClientTagOperation.list_tags_for_metadata` requests 
`/objects/{type}/{fullName}/tags?details=true`, whose REST response contains a 
`tags` array of tag objects. It extracts `names` instead, so a successful 
response falls back to an empty list. The policy equivalent correctly extracts 
`policies`.
   
   ### Error message and/or stacktrace
   
   No exception is raised. For a successful REST response containing two tag 
objects in `tags`, the MCP tool returns `[]`.
   
   ### How to reproduce
   
   1. Associate tags with a table.
   2. Verify that `GET 
/api/metalakes/{metalake}/objects/table/{fullName}/tags?details=true` returns 
the tag objects in `tags`.
   3. Call `list_tags_for_metadata` with that table's `metadata_full_name` and 
`metadata_type: table`.
   4. Observe `[]` instead of the tag objects, including their comments, 
properties, audit information, and inheritance flags.
   
   ### Additional context
   
   Confirmed on main at `441e590b98dba14bbd176a0660ce88cd39368476`. Regression 
tests using an HTTP mock transport reproduce the issue both through the REST 
client operation and an in-process MCP tool call. Both fail before changing the 
extracted field from `names` to `tags` and pass afterward.
   


-- 
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