fix(gateway): register shared MCP tools per profile

This commit is contained in:
joaomarcos
2026-09-08 02:16:09 -03:00
committed by kshitij
parent 7107185f58
commit d02edc2cbc
5 changed files with 254 additions and 11 deletions
+1 -3
View File
@@ -413,8 +413,6 @@ class MCPServerRunMixin:
def _deregister_tools(self) -> None:
"""Drop this server's tools from the registry (idempotent); on shutdown AND budget
exhaustion, so a dead server never leaves phantom tools in the prompt."""
from tools.registry import registry
for tool_name in list(getattr(self, "_registered_tool_names", [])):
registry.deregister(tool_name, scope=_core._server_registry_scope(self.name))
_registration._forget_mcp_tool_server(tool_name)
_registration._deregister_mcp_tool_all_scopes(self.name, tool_name)
self._registered_tool_names = []