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:
arc53-machine committed 2026-09-29 14:13:03 +01:00
1 parent a777aeac45
commit a45e369d0f
3 files changed
+73 -18

No files matched your search

+3 -1
View File
@@ -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):