n8n-io/n8n · error · NodeOperationError
No tool inputs found
Error message
No tool inputs found
What it means
Thrown by the ToolExecutor node when getInputConnectionData for AiTool returns a falsy value or a non-array. The node iterates over connected tools to find the one named toolName; if there is nothing iterable to loop over, it cannot proceed.
Source
Thrown at packages/@n8n/nodes-langchain/nodes/ToolExecutor/ToolExecutor.node.ts:111
throw new NodeOperationError(
this.getNode(),
`Failed to parse query: ${(error as Error).message}`,
);
}
const getQueryData = (name: string) => {
// node names in query may have underscores in place of spaces, use it for accessing the query data.
return (get(parsedQuery, name, null) ?? get(parsedQuery, name.replaceAll(' ', '_'), null)) as
| Record<string, unknown>
| string
| null;
};
const resultData: INodeExecutionData[] = [];
const toolInputs = await this.getInputConnectionData(NodeConnectionTypes.AiTool, 0);
if (!toolInputs || !Array.isArray(toolInputs)) {
throw new NodeOperationError(this.getNode(), 'No tool inputs found');
}
try {
for (const tool of toolInputs) {
// Handle toolkits
if (tool && typeof (tool as Toolkit).getTools === 'function') {
const toolsInToolkit = (tool as Toolkit).getTools();
for (const toolkitTool of toolsInToolkit) {
if (!(toolkitTool instanceof Tool || toolkitTool instanceof StructuredTool)) {
continue;
}
if (toolName === toolkitTool.name) {
if (hasGatedToolNodeName(toolkitTool.metadata) && node) {
const toolInput: { toolParameters: unknown } = {
toolParameters: getQueryData(toolName) ?? {},
};
const hitlInput = getQueryData(node);View on GitHub (pinned to 5ac6606e81)
Solutions
- Connect at least one Tool or Toolkit node to the ToolExecutor's AiTool input.
- Verify connected tool nodes execute and return a valid tool instance.
- Ensure the connection type is AiTool (not AiLanguageModel or other).
Example fix
// before: ToolExecutor has toolName set but no tool connected // after: connect the desired Tool/Toolkit node to the AiTool input
Defensive patterns
Strategy: validation
Validate before calling
const toolInputs = await getInputConnectionData(NodeConnectionTypes.AiTool, 0);
if (!Array.isArray(toolInputs) || toolInputs.length === 0) {
throw new Error('Connect at least one Tool/Toolkit');
} Type guard
function hasToolInputs(t): t is unknown[] { return Array.isArray(t) && t.length > 0; } Prevention
- Always connect at least one Tool or Toolkit node to ToolExecutor.
- Verify the connection type is AiTool.
- Use the editor preview to confirm tools resolve before execution.
When it happens
Trigger: After `const toolInputs = await this.getInputConnectionData(NodeConnectionTypes.AiTool, 0)`, the check `if (!toolInputs || !Array.isArray(toolInputs))` throws. Fires when no tool/toolkit is connected to the AiTool input, or the connection resolves to a non-array.
Common situations: ToolExecutor node with no tool connected; a connected tool node that failed to supply data; wrong connection type attached; the tool sub-graph upstream errored.
Related errors
- No models connected
- Reflector output must be valid JSON
- Chat Model is required
- Failed to parse query: ${(error as Error).message}
- Error executing tool: ${(error as Error).message}
AI-assisted analysis of n8n-io/n8n@5ac6606e81 (2026-08-12).
Data as JSON: /api/errors/46fa29332b17ad94.
Report an issue: GitHub.