aminghadersohi opened a new pull request, #43529:
URL: https://github.com/apache/superset/pull/43529

   ### SUMMARY
   
   The MCP `ToolAnnotations` model includes `openWorldHint` so clients can 
distinguish tools that stay within a deployment boundary from tools that may 
interact with external entities. On current `master`, Superset registers 70 MCP 
tools; all 70 declared `title`, `readOnlyHint`, and `destructiveHint`, but none 
declared `openWorldHint`.
   
   This change adds an explicit `openWorldHint=False` to every registered tool 
and adds a registration test that requires every advertised tool to provide 
`title`, `readOnlyHint`, `destructiveHint`, and `openWorldHint`. The MCP 
contributor guide is updated so new tools follow the same convention. The broad 
file count is unavoidable because each tool owns its `ToolAnnotations` 
declaration and the classification must be explicit at that declaration.
   
   #### Open-world classification
   
   No tool is marked `openWorldHint=True`:
   
   - Metadata read/write tools operate on Superset's metadata database.
   - Query tools operate on databases and semantic views configured as Superset 
datasources, which are part of the deployment's data boundary rather than an 
open-ended external entity set.
   - `generate_explore_link` and `open_sql_lab_with_context` construct 
Superset-local URLs without fetching them.
   - Report tools inspect report configuration but do not send reports or 
notifications.
   - `generate_bug_report` formats local diagnostic data for the caller to 
copy; it does not submit the report.
   
   Superset currently exposes no MCP tool that fetches an arbitrary external 
URL, sends mail or alerts, or calls a third-party service.
   
   #### Output schemas
   
   `outputSchema` is intentionally out of scope for this focused annotation 
change. FastMCP already derives internal output schemas for all 70 registered 
functions from their return annotations. Superset's 
`StructuredContentStripperMiddleware` deliberately removes those schemas 
together with structured content because some MCP client transports cannot 
encode or validate the structured responses correctly. Advertising output 
schemas therefore requires a separate compatibility change that pairs schemas 
with structured results and transport coverage; it is not a schema-derivation 
task.
   
   #### Blast radius and risk
   
   This only changes MCP `tools/list` metadata and contributor guidance. Tool 
inputs, outputs, permissions, and execution paths are unchanged. The main risk 
is an incorrect behavioral classification; each current tool was reviewed 
against the MCP open-world definition, and the registration test prevents 
future tools from silently omitting the field. Rollback is a revert of this 
commit.
   
   ### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
   
   Not applicable; there is no UI change.
   
   ### TESTING INSTRUCTIONS
   
   - `uvx pre-commit run --files $(git diff --name-only origin/master...HEAD)`
     - Includes mypy, Ruff formatting/linting, and pylint.
   - Full MCP unit suite: `PYTHONPATH="$PWD/superset-core/src" pytest -q 
tests/unit_tests/mcp_service`
     - `3562 passed`
   - Registration inventory: 70 tools registered; no missing required 
annotations; no tools with `openWorldHint=True`.
   
   ### EVAL EVIDENCE
   
   Not applicable. This changes deterministic tool-discovery metadata only; 
tool selection descriptions, arguments, results, and behavior are unchanged.
   
   ### COST AND LATENCY DELTA
   
   No tool-call runtime, model, prompt, or parameter changes. `tools/list` adds 
one boolean annotation per tool.
   
   ### PROMPT / NON-DETERMINISM
   
   No prompt, model-routing, or non-deterministic behavior changes.
   
   ### ADDITIONAL INFORMATION
   
   - [ ] Has associated issue:
   - [ ] Required feature flags:
   - [ ] Changes UI
   - [ ] Includes DB Migration (follow approval process in 
[SIP-59](https://github.com/apache/superset/issues/13351))
     - [ ] Migration is atomic, supports rollback & is backwards-compatible
     - [ ] Confirm DB migration upgrade and downgrade tested
     - [ ] Runtime estimates and downtime expectations provided
   - [x] Introduces new feature or API
   - [ ] Removes existing feature or API
   


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

Reply via email to