aminghadersohi commented on code in PR #38641: URL: https://github.com/apache/superset/pull/38641#discussion_r2935253491
########## superset-core/src/superset_core/mcp/decorators.py: ########## @@ -37,6 +37,8 @@ def another_tool(value: int) -> str: from typing import Any, Callable, TypeVar +from mcp.types import ToolAnnotations Review Comment: Fixed - wrapped in try/except with fallback to `Any` so superset-core remains importable without MCP extras. Fixed in ec9aec2. ########## superset/core/mcp/core_mcp_injection.py: ########## @@ -25,6 +25,8 @@ import logging from typing import Any, Callable, Optional, TypeVar +from mcp.types import ToolAnnotations Review Comment: Fixed - same try/except pattern applied here. Fixed in ec9aec2. ########## superset/mcp_service/explore/tool/generate_explore_link.py: ########## @@ -39,7 +39,15 @@ from superset.mcp_service.utils.schema_utils import parse_request -@tool(tags=["explore"], class_permission_name="Explore") +@tool( + tags=["explore"], + class_permission_name="Explore", + annotations=ToolAnnotations( + title="Generate explore link", + readOnlyHint=True, + destructiveHint=False, + ), Review Comment: Good catch - set `readOnlyHint=False` since it writes form_data_key cache entries via `MCPCreateFormDataCommand.run()`. Fixed in ec9aec2. ########## superset/mcp_service/sql_lab/tool/save_sql_query.py: ########## @@ -43,7 +43,14 @@ logger = logging.getLogger(__name__) -@tool(tags=["mutate"]) +@tool( + tags=["mutate"], + annotations=ToolAnnotations( Review Comment: Fixed - added `class_permission_name="SQLLab"` and `method_permission_name="write"` for proper RBAC enforcement, consistent with `execute_sql`. Fixed in ec9aec2. -- 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] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
