deepset-ai/haystack · error · NotImplementedError
SearchableToolset does not support concatenation.
Error message
SearchableToolset does not support concatenation.
What it means
SearchableToolset manages its tool catalog dynamically (search/select), so the Toolset '+' concatenation operator is intentionally unsupported. Using searchable_toolset + other_tool raises NotImplementedError rather than silently producing a broken set.
Source
Thrown at haystack/tools/searchable_toolset.py:142
self._search_tool_description = search_tool_description
self._search_tool_parameters_description = search_tool_parameters_description
# Runtime state (initialized in warm_up)
self._discovered_tools: dict[str, Tool] = {}
self._bootstrap_tool: Tool | None = None
self._document_store: InMemoryDocumentStore | None = None
self._passthrough: bool | None = None
# Optional per-run name filter, set on the copies returned by spawn(). When set, iteration only
# yields tools whose name is in this set, and search is scoped to it. None means no filtering.
self._selected_tool_names: set[str] | None = None
# Initialize parent with empty tools list - we manage tools dynamically
super().__init__(tools=[])
def __add__(self, other: Tool | Toolset | list[Tool]) -> "Toolset":
"""Concatenation is not supported for SearchableToolset."""
raise NotImplementedError("SearchableToolset does not support concatenation.")
def add(self, tool: Tool | Toolset) -> None:
"""Adding new tools after initialization is not supported for SearchableToolset."""
raise NotImplementedError("SearchableToolset does not support adding new tools after initialization.")
def warm_up(self) -> None:
"""
Prepare the toolset for use.
Warms up the catalog (so lazy toolsets like MCPToolset can connect) and flattens it. Above the passthrough
threshold, it also indexes the catalog and creates the search_tools bootstrap tool.
This method is idempotent: it only warms up the toolset the first time it is called.
:raises ValueError: If the flattened catalog contains tools with duplicate names.
"""
if self._passthrough is not None:
returnView on GitHub (pinned to e318778c9b)
Solutions
- Include the extra tools in the catalog list at construction: SearchableToolset(catalog=[...tools, extra_tool])
- Use a plain Toolset if you need + concatenation and don't need search semantics
- Build a combined list first and pass it once to SearchableToolset(catalog=combined)
Example fix
// before ts = searchable_toolset + extra_tool // after ts = SearchableToolset(catalog=list(base_catalog) + [extra_tool])
Defensive patterns
Strategy: fallback
Validate before calling
def combine_toolsets(a, b):
from haystack.tools import SearchableToolset, Toolset
if isinstance(a, SearchableToolset) or isinstance(b, SearchableToolset):
return SearchableToolset(catalog=[a, b])
return a + b Type guard
def supports_concat(toolset) -> bool:
return not isinstance(toolset, SearchableToolset) Try / catch
try:
combined = searchable + extra
except NotImplementedError:
combined = SearchableToolset(catalog=[searchable, extra]) Prevention
- Don't use + with SearchableToolset; compose via the catalog argument
- Check the toolset class docs for which mutation/combination ops are supported
- Encapsulate toolset combination in one helper that handles both kinds
When it happens
Trigger: combined = searchable_toolset + another_tool or searchable + [t1, t2]; also occurrences where code sums a mixed list of toolsets with sum()/reduce.
Common situations: Code that concatenates ordinary Toolsets being reused with a SearchableToolset; combining agent tool lists with + idiomatically.
Understand the failure class
Background: UnsupportedOperationException and "is not supported" errors: when a library deliberately refuses a call — this error's family across 30 libraries.
Related errors
- SearchableToolset does not support adding new tools after in
- Component instance cannot be added to the pipeline more than
- '{type(instance)}' doesn't seem to be a component. Is this c
- Component has already been added to this Pipeline under the
- There is no component named '{name}' in the pipeline. The va
AI-assisted analysis of deepset-ai/haystack@e318778c9b (2026-08-30).
Data as JSON: /api/errors/c1915884727e13f2.
Report an issue: GitHub.