{"record":{"id":"1c0a2bf5bc4b5cbb","repo":"n8n-io/n8n","slug":"the-selected-tools-are-not-supported-by-current","errorCode":null,"errorMessage":"The selected tools are not supported by \"${currentAgentType}\", please use \"Tools Agent\" instead","messagePattern":"The selected tools are not supported by \"(.+?)\", please use \"Tools Agent\" instead","errorType":"exception","errorClass":"NodeOperationError","httpStatus":null,"severity":"error","filePath":"packages/@n8n/nodes-langchain/nodes/agents/Agent/agents/utils.ts","lineNumber":46,"sourceCode":"\tif (ctx.getNode().typeVersion <= 1.6) {\n\t\treturn parsedOutput;\n\t}\n\t// For 1.7 and above, we try to extract the output from the parsed output\n\t// with fallback to the original output if it's not present\n\treturn parsedOutput?.output ?? parsedOutput;\n}\n\nexport async function checkForStructuredTools(\n\ttools: Array<Tool | DynamicStructuredTool<ZodObjectAny>>,\n\tnode: INode,\n\tcurrentAgentType: string,\n) {\n\tconst dynamicStructuredTools = tools.filter(\n\t\t(tool) => tool.constructor.name === 'DynamicStructuredTool',\n\t);\n\tif (dynamicStructuredTools.length > 0) {\n\t\tconst getToolName = (tool: Tool | DynamicStructuredTool) => `\"${tool.name}\"`;\n\t\tthrow new NodeOperationError(\n\t\t\tnode,\n\t\t\t`The selected tools are not supported by \"${currentAgentType}\", please use \"Tools Agent\" instead`,\n\t\t\t{\n\t\t\t\titemIndex: 0,\n\t\t\t\tdescription: `Incompatible connected tools: ${dynamicStructuredTools.map(getToolName).join(', ')}`,\n\t\t\t},\n\t\t);\n\t}\n}\n","sourceCodeStart":28,"sourceCodeEnd":56,"githubUrl":"https://github.com/n8n-io/n8n/blob/5ac6606e81f67bb9534255570cd4e86fd8101eee/packages/@n8n/nodes-langchain/nodes/agents/Agent/agents/utils.ts#L28-L56","documentation":"Thrown by checkForStructuredTools when one or more connected tools are DynamicStructuredTool instances. Only Tools Agent supports structured tools; other agent types (Conversational, ReAct, Plan & Execute, SQL) cannot invoke them. The error names the offending tool(s) in its description and instructs the user to switch to Tools Agent.","triggerScenarios":"A non-Tools-Agent agent (Conversational / ReAct / Plan & Execute / SQL) has a DynamicStructuredTool connected — e.g. a function tool defined with a Zod schema, the HTTP Request Tool, or another tool that emits DynamicStructuredTool.","commonSituations":"User added a structured tool while keeping an older agent type; workflow copied from a Tools Agent setup into a different agent; upgraded a tool that became structured.","solutions":["Switch the Agent type to 'Tools Agent' (which supports DynamicStructuredTool).","Or replace the structured tool with a non-structured equivalent compatible with the current agent type.","Inspect the description field of the error to see exactly which tools are incompatible."],"exampleFix":null,"handlingStrategy":"validation","validationCode":"const structured = tools.filter(t => t.constructor.name === 'DynamicStructuredTool');\nif (structured.length > 0 && currentAgentType !== 'Tools Agent') {\n  throw new NodeOperationError(node, `Agent type '${currentAgentType}' does not support structured tools (${structured.map(t => t.name).join(', ')}). Switch to Tools Agent.`);\n}","typeGuard":"function isDynamicStructuredTool(tool: unknown): tool is DynamicStructuredTool {\n  return !!tool && (tool as any).constructor?.name === 'DynamicStructuredTool';\n}","tryCatchPattern":null,"preventionTips":["If you need structured tools, use the Tools Agent type.","When copying workflows between agent types, audit connected tools for DynamicStructuredTool instances.","Read the error description to find the offending tool names."],"tags":["langchain","agent","tools","structured-tools","configuration","compatibility"],"backgroundTag":null,"analyzedSha":"5ac6606e81f67bb9534255570cd4e86fd8101eee","analyzedAt":"2026-08-12T05:26:35.080Z","schemaVersion":2},"datasetVersion":"2026-08-12T18:17:37.767Z"}