n8n-io/n8n · error · NodeOperationError
Tool "${toolName}" was called but not found among connected
Error message
Tool "${toolName}" was called but not found among connected tools What it means
Thrown during AlibabaCloud text/message tool-call processing when the LLM returns a function/tool call referencing a tool name that does not match any connected tool's name. The code iterates over connectedTools looking for a matching name; if none is found, toolResponse remains undefined and the error is thrown. This indicates a mismatch between what the model thinks is available and what the node actually has connected.
Source
Thrown at packages/@n8n/nodes-langchain/nodes/vendors/AlibabaCloud/actions/text/message.operation.ts:463
for (const toolCall of toolCalls) {
const toolName = toolCall.function.name;
let toolInput: unknown;
try {
toolInput = JSON.parse(toolCall.function.arguments);
} catch {
toolInput = toolCall.function.arguments;
}
let toolResponse: unknown;
for (const connectedTool of connectedTools) {
if (connectedTool.name === toolName) {
toolResponse = await connectedTool.invoke(toolInput);
}
}
if (toolResponse === undefined) {
throw new NodeOperationError(
this.getNode(),
`Tool "${toolName}" was called but not found among connected tools`,
);
}
messages.push({
role: 'tool',
content:
typeof toolResponse === 'object'
? JSON.stringify(toolResponse)
: String(toolResponse ?? ''),
name: toolName,
});
}
}
View on GitHub (pinned to 5ac6606e81)
Solutions
- Check which tools are connected to the AlibabaCloud node and verify their names match what the model is calling.
- Inspect the tool call in the execution data — the error message includes the exact toolName the model tried to call.
- Re-add the missing tool sub-node or rename the connected tool to match the model's expectation.
- Restart the conversation/workflow execution so the model receives an updated tool list.
Defensive patterns
Strategy: validation
Validate before calling
// Before processing tool calls, verify the called tool exists:
const connectedToolNames = connectedTools.map(t => t.name);
for (const toolCall of toolCalls ?? []) {
if (!connectedToolNames.includes(toolCall.function.name)) {
// log warning and skip, or provide a fallback response
messages.push({
role: 'tool',
content: `Tool '${toolCall.function.name}' is not available.`,
name: toolCall.function.name,
});
}
} Try / catch
try {
// ... tool call processing ...
} catch (error) {
if (error instanceof NodeOperationError && error.message.includes('not found among connected tools')) {
// provide a graceful fallback to the model
messages.push({ role: 'tool', content: 'Tool not available, please use an alternative.', name: toolName });
} else {
throw error;
}
} Prevention
- Ensure all tool sub-nodes are properly connected before executing the workflow.
- Use stable, unique tool names that the model is unlikely to confuse with others.
- Start each conversation/workflow run fresh so the model receives the current connected tool list.
- Avoid disconnecting or renaming tools mid-conversation in interactive sessions.
When it happens
Trigger: The Alibaba Cloud Qwen model returns a tool_call with a function.name that doesn't match any connected LangChain tool's name. This happens when tools were connected/disconnected after the conversation context was established, when the model hallucinates a tool name, or when tool naming conventions differ between the model's training and the connected tools.
Common situations: A tool sub-node was removed or renamed after the workflow was last run; the model invents a tool name not in the actual tool list; tool names contain characters or casing that differs from what the model outputs; multiple tools with overlapping functionality cause the model to blend names.
Related errors
- LLM doesn't support binding tools
- Failed to parse output
- Run ${this.runId} is not suspended. Cannot resume.
- Reflector output must be valid JSON
- Reflector output must be a JSON object
AI-assisted analysis of n8n-io/n8n@5ac6606e81 (2026-08-12).
Data as JSON: /api/errors/91d8c666da0cf378.
Report an issue: GitHub.