sadpandajoe commented on code in PR #44146:
URL: https://github.com/apache/superset/pull/44146#discussion_r4041747814
##########
docs/admin_docs/configuration/mcp-server.mdx:
##########
@@ -1074,3 +1074,68 @@ once, even when multiple dimensions are missing.
The tool does not rewrite dots into SQL path separators: quoting and
nested-field
support depend on the dataset's database dialect, and dots can also be literal
characters in column names.
+
+## Dataset discovery and routing
+
+`list_datasets` searches table name, **description**, schema, and SQL using
+escaped, case-insensitive substring matching. Write descriptions with business
+terminology to make differently named datasets discoverable. A complete UUID
+passed as `search` is treated as an exact UUID filter; an explicit `uuid`
filter
+can also look up one or more datasets by UUID. Matching
+datasets are candidates, ordered by the requested sort (last modified by
default), not
+ranked recommendations. Compare descriptions and metrics, present alternatives
+when ambiguous, and clarify before querying. No matches does not prove that
data
+does not exist; search only covers accessible datasets and the configured
scope.
+
+`query_dataset` returns `dataset_id` and `dataset_name`; `get_table`
additionally
+returns `source` and the corresponding dataset or external-view identity. Cite
+these fields in answers rather than guessing the source from the query text.
+Neither tool selects an alternative dataset automatically.
+
+### Optional per-role dataset scope
+
+Set `MCP_DATASET_ROLE_ALLOWLIST` in `superset_config.py` to constrain MCP to a
+curated set of registered datasets:
+
+```python
+MCP_DATASET_ROLE_ALLOWLIST = {
+ "Finance Readers": ["00000000-0000-0000-0000-000000000001"],
+ "Operations Readers": ["00000000-0000-0000-0000-000000000002"],
+}
+```
+
+Obtain dataset UUIDs from `get_dataset_info` (or request `uuid` in
+`list_datasets.select_columns`). Use UUIDs, not names or numeric IDs, in
config.
+Effective roles, including group roles, contribute the **union** of their
lists.
+That union is **intersected with existing dataset access**. Unconfigured roles
+contribute nothing; Admin has no routing exemption. `None` (the default)
disables
+this feature; `{}` allows no datasets. Invalid entries cause a configuration
+error at startup rather than silently disabling the restriction.
+
+Scoped mode supports the dataset tools that name a registered dataset —
+`list_datasets`, `get_dataset_info`, `query_dataset`, and, with a built-in
+dataset, `get_table`, `list_metrics`, `get_compatible_dimensions` and
+`get_compatible_metrics` — plus `health_check` and `get_schema`.
+Discovery filters before counting and pagination. Other tools refuse in this
Review Comment:
Scoped mode still allows `generate_bug_report`, because that public tool
uses `protect=False` and never enters `mcp_auth_hook`, so the claim that every
other tool refuses is not true for operators relying on this list. Could this
document the public exception (or scope the statement to auth-wrapped tools)?
--
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]