roryqi commented on code in PR #13477:
URL: https://github.com/apache/gravitino/pull/13477#discussion_r4134131277


##########
docs/gravitino-mcp-server.md:
##########
@@ -130,7 +130,11 @@ Gravitino MCP server supports the following tools, and you 
could export tool by
 | `list_statistics_for_partition`     | Retrieve a list of statistics 
associated with a specific partition.            | `statistics` |
 | `get_list_of_policies`              | Retrieve a list of policies in the 
system.                                     | `policy`     |
 | `get_policy_detail_information`     | Retrieve detailed information for a 
specific policy by policy name.            | `policy`     |
-| `list_policies_for_metadata`        | List all policies derived for a 
specific metadata item.                    | `policy`     |
+| `list_policies_for_tag`             | List policies directly associated with 
a tag, including selectors.             | `policy`, `tag` |

Review Comment:
   Fixed in 8b80a477ed. I widened the Tag column and aligned all rows in the 
tool table.



##########
docs/gravitino-mcp-server.md:
##########
@@ -130,7 +130,11 @@ Gravitino MCP server supports the following tools, and you 
could export tool by
 | `list_statistics_for_partition`     | Retrieve a list of statistics 
associated with a specific partition.            | `statistics` |
 | `get_list_of_policies`              | Retrieve a list of policies in the 
system.                                     | `policy`     |
 | `get_policy_detail_information`     | Retrieve detailed information for a 
specific policy by policy name.            | `policy`     |
-| `list_policies_for_metadata`        | List all policies derived for a 
specific metadata item.                    | `policy`     |

Review Comment:
   Yes, removed in 8b80a477ed. `list_policies_for_metadata` has been removed 
from the MCP tool registration, the `PolicyOperation` interface, the plain REST 
client implementation, mocks, and related tests.



##########
mcp-server/mcp_server/client/policy_operation.py:
##########
@@ -46,21 +46,76 @@ async def load_policy(self, policy_name: str) -> str:
         """
         pass
 
+    @abstractmethod
+    async def list_policies_for_tag(self, tag_name: str) -> str:
+        """List all policies directly associated with a tag.
+
+        Args:
+            tag_name: Name of the tag
+
+        Returns:
+            str: JSON-formatted list of policy-tag associations, including 
selectors
+        """
+        pass
+
+    @abstractmethod
+    async def associate_policy_with_tag(
+        self, tag_name: str, policy_name: str, selector: dict
+    ) -> str:
+        """Associate one policy with a tag.
+
+        Args:
+            tag_name: Name of the tag
+            policy_name: Name of the policy
+            selector: Selector controlling which tag assignments match the 
policy
+
+        Returns:
+            str: JSON-formatted policy-tag association
+        """
+        pass
+
+    @abstractmethod
+    async def disassociate_policy_from_tag(
+        self, tag_name: str, policy_name: str
+    ) -> str:
+        """Remove one policy association from a tag.
+
+        Args:
+            tag_name: Name of the tag
+            policy_name: Name of the policy
+
+        Returns:
+            str: JSON-formatted removal confirmation
+        """
+        pass
+
+    @abstractmethod
+    async def list_tags_for_policy(self, policy_name: str) -> str:
+        """List all tags directly associated with a policy.
+
+        Args:
+            policy_name: Name of the policy
+
+        Returns:
+            str: JSON-formatted list of policy-tag associations, including 
selectors
+        """
+        pass
+
     @abstractmethod
     async def list_policies_for_metadata(

Review Comment:
   Removed in 8b80a477ed, together with its implementation and tool/test 
references.



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