You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@superset.apache.org by ru...@apache.org on 2026/09/10 03:13:35 UTC

(superset) branch docs/pr-41611-needs-docs-feat-mcp-add-semantic-layer-m created (now 85ff7ff5850)

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

rusackas pushed a change to branch docs/pr-41611-needs-docs-feat-mcp-add-semantic-layer-m
in repository https://gitbox.apache.org/repos/asf/superset.git


      at 85ff7ff5850 docs(mcp): document semantic-layer MCP tools from #41611

This branch includes the following new commits:

     new 85ff7ff5850 docs(mcp): document semantic-layer MCP tools from #41611

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.



(superset) 01/01: docs(mcp): document semantic-layer MCP tools from #41611

Posted by ru...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

rusackas pushed a commit to branch docs/pr-41611-needs-docs-feat-mcp-add-semantic-layer-m
in repository https://gitbox.apache.org/repos/asf/superset.git

commit 85ff7ff58509938e377279f5ab036de6d52540bd
Author: rusackas <ev...@rusackas.com>
AuthorDate: Wed Sep 9 20:12:50 2026 -0700

    docs(mcp): document semantic-layer MCP tools from #41611
    
    list_metrics, get_table, get_compatible_dimensions, and get_compatible_metrics
    shipped in #41611 with no user-facing or admin docs. Add a "Query the
    Semantic Layer" workflow section and tool reference table to the AI docs,
    and the RBAC permission row for the admin MCP server guide.
    
    Co-Authored-By: Evan Rusackas <ev...@preset.io>
    Co-Authored-By: Claude Sonnet 5 <no...@anthropic.com>
---
 docs/admin_docs/configuration/mcp-server.mdx       |  1 +
 .../docs/using-superset/using-ai-with-superset.mdx | 35 ++++++++++++++++++++++
 2 files changed, 36 insertions(+)

diff --git a/docs/admin_docs/configuration/mcp-server.mdx b/docs/admin_docs/configuration/mcp-server.mdx
index d66c9270076..10486d8c545 100644
--- a/docs/admin_docs/configuration/mcp-server.mdx
+++ b/docs/admin_docs/configuration/mcp-server.mdx
@@ -736,6 +736,7 @@ Each tool declares one or more required FAB permissions. The table below maps to
 | `list_charts`, `get_chart_info`, `get_chart_data`, `get_chart_preview`, `generate_chart`, `update_chart` | `can_read` on `Chart` (read), `can_write` on `Chart` (mutate)         |
 | `list_dashboards`, `get_dashboard_info`, `generate_dashboard`, `add_chart_to_existing_dashboard`         | `can_read` on `Dashboard` (read), `can_write` on `Dashboard` (mutate) |
 | `list_datasets`, `get_dataset_info`, `create_virtual_dataset`                                            | `can_read` on `Dataset` (read), `can_write` on `Dataset` (mutate)     |
+| `list_metrics`, `get_table`, `get_compatible_dimensions`, `get_compatible_metrics`                        | `can_read` on `Dataset`                                               |
 | `list_databases`, `get_database_info`                                                                    | `can_read` on `Database`                                              |
 | `execute_sql`                                                                                            | `can_execute_sql_query` on `SQLLab`                                   |
 | `open_sql_lab_with_context`                                                                              | `can_read` on `SQLLab`                                                |
diff --git a/docs/docs/using-superset/using-ai-with-superset.mdx b/docs/docs/using-superset/using-ai-with-superset.mdx
index 4ded14cf020..46b0cf0be31 100644
--- a/docs/docs/using-superset/using-ai-with-superset.mdx
+++ b/docs/docs/using-superset/using-ai-with-superset.mdx
@@ -126,6 +126,32 @@ Build ad-hoc SQL datasets that can be used as the basis for charts:
 > "Create a dataset from: SELECT region, SUM(revenue) as total_revenue FROM orders GROUP BY region"
 > "Make a virtual dataset called 'monthly_signups' from the users table filtered to last 12 months"
 
+### Query the Semantic Layer
+
+Discover and query metrics across both built-in datasets and external semantic
+views (when your deployment has semantic views registered), without writing SQL:
+
+- **Discover metrics** -- search metrics by name or description across every dataset and semantic view you can access, with each metric's compatible dimensions included
+- **Query by metric and dimension** -- get tabular results by naming metrics and dimensions instead of writing SQL, with optional filters and time ranges
+- **Progressively refine a query** -- given metrics and/or dimensions already picked, find the ones that can still be added without breaking the query
+
+**Example prompts:**
+
+> "What metrics are available related to revenue?"
+> "Show me revenue by region for the last 30 days"
+> "I've picked the revenue metric -- what dimensions can I break it down by?"
+
+:::tip Recommended workflow
+1. **`list_metrics`** -- search for a metric; note its `dataset_id` (built-in) or `view_id` (external semantic view)
+2. **`get_table`** -- pass that `dataset_id`/`view_id` along with metric and dimension names to get results
+3. **`get_compatible_dimensions`** / **`get_compatible_metrics`** -- as the user adds selections, check what else can validly be combined
+
+Built-in datasets accept any combination of saved metrics and groupby-enabled
+columns since a SQL `GROUP BY` has no metric-level constraints. External
+semantic views can impose additional compatibility rules, which these tools
+surface instead of failing the query outright.
+:::
+
 ### Run SQL Queries
 
 Execute SQL directly through your AI assistant:
@@ -267,6 +293,15 @@ Ask your admin for the MCP server URL and any authentication tokens you need.
 | `create_virtual_dataset` | Create a virtual dataset from a SQL query                                                                                    |
 | `update_dataset_metric`  | Update a saved metric's expression, name, verbose_name, or format (affects every chart using it; requires dataset ownership) |
 
+### Semantic Layer
+
+| Tool                         | Description                                                                                                                       |
+| ---------------------------- | ----------------------------------------------------------------------------------------------------------------------------------- |
+| `list_metrics`                | Discover metrics by name/description across built-in datasets and external semantic views, with compatible dimensions included    |
+| `get_table`                   | Query a dataset or semantic view by metric and dimension names, with optional filters, time range, and sorting                    |
+| `get_compatible_dimensions`   | Given metrics/dimensions already selected, return the dimensions that can still be added                                          |
+| `get_compatible_metrics`      | Given metrics/dimensions already selected, return the metrics that can still be added                                             |
+
 ### Charts
 
 | Tool                    | Description                                                                                                                                      |