bito-code-review[bot] commented on PR #43842:
URL: https://github.com/apache/superset/pull/43842#issuecomment-5534026274
<!-- Bito Reply -->
The flagged issue is correct. When `CORE_MCP_HOST_TOOLS_ENABLED` is set to
`False`, `initialize_core_mcp_dependencies()` is skipped, but if other parts of
the application still attempt to use the `tool` or `prompt` decorators (which
are typically registered by that function), they will fail with a
`NotImplementedError` because the underlying infrastructure was not initialized.
To resolve this, you should ensure that the decorators themselves are either
conditionally registered or provide a safe fallback when the MCP stack is
disabled. A common approach is to make the decorators no-ops or return a dummy
implementation when the feature is disabled, rather than raising an error.
Would you like me to fetch all comments and validate the rest of the PR to
implement a comprehensive fix?
**superset/initialization/__init__.py**
```
if self.config.get("CORE_MCP_HOST_TOOLS_ENABLED", True):
initialize_core_mcp_dependencies()
```
--
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]