You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@superset.apache.org by jl...@apache.org on 2025/11/07 18:19:39 UTC

(superset) branch master updated: refactor(mcp): shorten tool name from get_superset_instance_info to get_instance_info (#36032)

This is an automated email from the ASF dual-hosted git repository.

jli pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/superset.git


The following commit(s) were added to refs/heads/master by this push:
     new d2550a525b refactor(mcp): shorten tool name from get_superset_instance_info to get_instance_info (#36032)
d2550a525b is described below

commit d2550a525b0cdf0f0849811e11afd45172703b6a
Author: Amin Ghadersohi <am...@gmail.com>
AuthorDate: Sat Nov 8 04:19:32 2025 +1000

    refactor(mcp): shorten tool name from get_superset_instance_info to get_instance_info (#36032)
---
 superset/mcp_service/app.py                                         | 6 +++---
 superset/mcp_service/system/prompts/quickstart.py                   | 2 +-
 superset/mcp_service/system/resources/instance_metadata.py          | 4 ++--
 superset/mcp_service/system/schemas.py                              | 2 +-
 superset/mcp_service/system/tool/__init__.py                        | 4 ++--
 .../tool/{get_superset_instance_info.py => get_instance_info.py}    | 2 +-
 6 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/superset/mcp_service/app.py b/superset/mcp_service/app.py
index a091b9943a..ac55b2f4c1 100644
--- a/superset/mcp_service/app.py
+++ b/superset/mcp_service/app.py
@@ -67,7 +67,7 @@ Explore & Analysis:
 - generate_explore_link: Create pre-configured explore URL with dataset/metrics/filters
 
 System Information:
-- get_superset_instance_info: Get instance-wide statistics and metadata
+- get_instance_info: Get instance-wide statistics and metadata
 
 Available Resources:
 - superset://instance/metadata: Access instance configuration and metadata
@@ -118,7 +118,7 @@ General usage tips:
 - All tools return structured, Pydantic-typed responses
 - Chart previews are served as PNG images via custom screenshot endpoints
 
-If you are unsure which tool to use, start with get_superset_instance_info
+If you are unsure which tool to use, start with get_instance_info
 or use the superset_quickstart prompt for an interactive guide.
 """
 
@@ -283,7 +283,7 @@ from superset.mcp_service.system import (  # noqa: F401, E402
     resources as system_resources,
 )
 from superset.mcp_service.system.tool import (  # noqa: F401, E402
-    get_superset_instance_info,
+    get_instance_info,
     health_check,
 )
 
diff --git a/superset/mcp_service/system/prompts/quickstart.py b/superset/mcp_service/system/prompts/quickstart.py
index 5eaccfec0a..3eb1104afb 100644
--- a/superset/mcp_service/system/prompts/quickstart.py
+++ b/superset/mcp_service/system/prompts/quickstart.py
@@ -82,7 +82,7 @@ I'll help you through these steps:
 5. 🚀 **Learn Advanced Features** - Discover filters, SQL Lab, and more
 
 To get started, I'll use these tools:
-- `get_superset_instance_info` - Overview of your Superset instance
+- `get_instance_info` - Overview of your Superset instance
 - `list_datasets` - Find available datasets
 - `get_dataset_info` - Explore dataset details
 - `generate_chart` - Create visualizations
diff --git a/superset/mcp_service/system/resources/instance_metadata.py b/superset/mcp_service/system/resources/instance_metadata.py
index 4e433c7a16..e250894602 100644
--- a/superset/mcp_service/system/resources/instance_metadata.py
+++ b/superset/mcp_service/system/resources/instance_metadata.py
@@ -55,7 +55,7 @@ def get_instance_metadata_resource() -> str:
         from superset.daos.user import UserDAO
         from superset.mcp_service.mcp_core import InstanceInfoCore
         from superset.mcp_service.system.schemas import InstanceInfo
-        from superset.mcp_service.system.tool.get_superset_instance_info import (
+        from superset.mcp_service.system.tool.get_instance_info import (
             calculate_dashboard_breakdown,
             calculate_database_breakdown,
             calculate_instance_summary,
@@ -101,7 +101,7 @@ def get_instance_metadata_resource() -> str:
                 "error": "Unable to fetch complete metadata",
                 "tips": [
                     "Use list_datasets to explore available data",
-                    "Use get_superset_instance_info for basic stats",
+                    "Use get_instance_info for basic stats",
                 ],
             }
         )
diff --git a/superset/mcp_service/system/schemas.py b/superset/mcp_service/system/schemas.py
index 978b39a50e..d031f57655 100644
--- a/superset/mcp_service/system/schemas.py
+++ b/superset/mcp_service/system/schemas.py
@@ -45,7 +45,7 @@ class HealthCheckResponse(BaseModel):
 
 class GetSupersetInstanceInfoRequest(BaseModel):
     """
-    Request schema for get_superset_instance_info tool.
+    Request schema for get_instance_info tool.
 
     Currently has no parameters but provides consistent API for future extensibility.
     """
diff --git a/superset/mcp_service/system/tool/__init__.py b/superset/mcp_service/system/tool/__init__.py
index 3fd92c1665..1581df274f 100644
--- a/superset/mcp_service/system/tool/__init__.py
+++ b/superset/mcp_service/system/tool/__init__.py
@@ -17,10 +17,10 @@
 
 """System tools for MCP service."""
 
-from .get_superset_instance_info import get_superset_instance_info
+from .get_instance_info import get_instance_info
 from .health_check import health_check
 
 __all__ = [
     "health_check",
-    "get_superset_instance_info",
+    "get_instance_info",
 ]
diff --git a/superset/mcp_service/system/tool/get_superset_instance_info.py b/superset/mcp_service/system/tool/get_instance_info.py
similarity index 99%
rename from superset/mcp_service/system/tool/get_superset_instance_info.py
rename to superset/mcp_service/system/tool/get_instance_info.py
index 4d64b334d6..4e217c53d2 100644
--- a/superset/mcp_service/system/tool/get_superset_instance_info.py
+++ b/superset/mcp_service/system/tool/get_instance_info.py
@@ -233,7 +233,7 @@ _instance_info_core = InstanceInfoCore(
 
 @mcp.tool
 @mcp_auth_hook
-def get_superset_instance_info(
+def get_instance_info(
     request: GetSupersetInstanceInfoRequest, ctx: Context
 ) -> InstanceInfo:
     """Get Superset instance statistics.