mirror of
https://github.com/tiennm99/DocsGPT.git
synced 2026-10-17 04:14:29 +00:00
Run a tool only on a connection of the connector that provides it
At run time a tool now refuses a connection whose connector does not list the tool's type (a Telegram bot token never reaches an ntfy or MCP tool), and an MCP tool refuses a connection when no server is known for it, instead of sending the key without checking. Legacy MCP rows still find their server from the stored provider value.
This commit is contained in:
1 parent
a777aeac45
commit
a45e369d0f
3 files changed
+73
-18
No files matched your search
@@ -479,7 +479,9 @@ def connector_key_for_row(row: dict) -> Optional[str]:
|
||||
"""
|
||||
key = row.get("connector_key")
|
||||
provider = row.get("provider") or ""
|
||||
if not key:
|
||||
if not key or key.startswith("mcp:"):
|
||||
# ``mcp:<server>`` is a provider value, never a catalog key.
|
||||
key = None
|
||||
if provider.startswith("mcp:"):
|
||||
key = "custom_mcp"
|
||||
elif get_definition(provider):
|
||||
|
||||
Reference in new issue
Block a user