{"record":{"id":"23d638e53f7962e8","repo":"FlowiseAI/Flowise","slug":"tool-not-selected","errorCode":null,"errorMessage":"Tool not selected","messagePattern":"Tool not selected","errorType":"validation","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/components/nodes/agentflow/Tool/Tool.ts","lineNumber":209,"sourceCode":"\n        const toolInputArgs = nodeData.inputs?.toolInputArgs as IToolInputArgs[]\n        const _toolUpdateState = nodeData.inputs?.toolUpdateState\n\n        const state = options.agentflowRuntime?.state as ICommonObject\n        const chatId = options.chatId as string\n        const isLastNode = options.isLastNode as boolean\n        const isStreamable = isLastNode && options.sseStreamer !== undefined\n\n        const abortController = options.abortController as AbortController\n\n        // Update flow state if needed\n        let newState = { ...state }\n        if (_toolUpdateState && Array.isArray(_toolUpdateState) && _toolUpdateState.length > 0) {\n            newState = updateFlowState(state, _toolUpdateState)\n        }\n\n        if (!selectedTool) {\n            throw new Error('Tool not selected')\n        }\n\n        const nodeInstanceFilePath = options.componentNodes[selectedTool].filePath as string\n        const nodeModule = await import(nodeInstanceFilePath)\n        const newToolNodeInstance = new nodeModule.nodeClass()\n        const newNodeData = {\n            ...nodeData,\n            credential: selectedToolConfig['FLOWISE_CREDENTIAL_ID'],\n            inputs: {\n                ...nodeData.inputs,\n                ...selectedToolConfig\n            }\n        }\n        const toolInstance = (await newToolNodeInstance.init(newNodeData, '', options)) as Tool | Tool[]\n\n        let toolCallArgs: Record<string, any> = {}\n\n        const parseInputValue = (value: string): any => {","sourceCodeStart":191,"sourceCodeEnd":227,"githubUrl":"https://github.com/FlowiseAI/Flowise/blob/abe4a8601a058047b350c260676826e21dd14101/packages/components/nodes/agentflow/Tool/Tool.ts#L191-L227","documentation":"Tool_Agentflow.run() requires `selectedTool` — the id of a real component node that implements the tool. When it is falsy (empty/undefined), the node cannot resolve `options.componentNodes[selectedTool]`, so it throws before importing the tool module. This is a configuration error, not a runtime/API failure.","triggerScenarios":"The Tool node's tool-selection input is blank, bound to a variable that resolves to empty, or the selected tool component was deleted/renamed after the flow was saved.","commonSituations":"Newly dropped Tool node with no tool picked; flow template referencing a custom tool not installed in this workspace; conditional logic sets the tool name to '' at runtime.","solutions":["Open the Tool node and pick a tool from the dropdown / wire a tool component to it.","If bound to a variable, ensure it resolves to an existing componentNodes key at runtime.","Confirm the referenced tool component is still present in the workspace.","Save and re-run the flow."],"exampleFix":null,"handlingStrategy":"validation","validationCode":"const tool = nodeData.inputs?.selectedTool\nif (!tool || !options.componentNodes?.[tool]) {\n  throw new Error(`Tool node requires a selectedTool that exists in componentNodes`)\n}","typeGuard":null,"tryCatchPattern":"try {\n  await toolNode.run(nodeData, input, options)\n} catch (e) {\n  if ((e as Error).message === 'Tool not selected') {\n    // open node and pick a tool\n  }\n  throw e\n}","preventionTips":["Make selectedTool a required field in the node editor.","After deleting/renaming a tool component, audit flows that reference it.","When importing flows, ensure referenced tool components are installed."],"tags":["agentflow","tool-node","validation","config","missing-tool"],"backgroundTag":null,"analyzedSha":"abe4a8601a058047b350c260676826e21dd14101","analyzedAt":"2026-08-12T16:04:40.823Z","schemaVersion":2},"datasetVersion":"2026-08-12T18:17:37.767Z"}