{"record":{"id":"765f8aab776de58d","repo":"n8n-io/n8n","slug":"tool-name-not-found-in-item-json-tool-or-item-tool","errorCode":null,"errorMessage":"Tool name not found in item.json.tool or item.tool","messagePattern":"Tool name not found in item\\.json\\.tool or item\\.tool","errorType":"exception","errorClass":"NodeOperationError","httpStatus":null,"severity":"error","filePath":"packages/@n8n/nodes-langchain/nodes/mcp/shared/runtime.ts","lineNumber":226,"sourceCode":"\n/**\n * Run the tool named in `item.json.tool` against the connected client and push\n * the result onto `returnData`. Shared by the cached and non-cached execute paths.\n */\nasync function runToolCall(opts: {\n\tctx: IExecuteFunctions;\n\tnode: INode;\n\titem: INodeExecutionData;\n\tmcpTools: McpTool[];\n\tclient: Client;\n\ttimeout: number;\n\titemIndex: number;\n\treturnData: INodeExecutionData[];\n}): Promise<void> {\n\tconst { ctx, node, item, mcpTools, client, timeout, itemIndex, returnData } = opts;\n\n\tif (!item.json.tool || typeof item.json.tool !== 'string') {\n\t\tthrow new NodeOperationError(node, 'Tool name not found in item.json.tool or item.tool', {\n\t\t\titemIndex,\n\t\t});\n\t}\n\n\tconst toolName = item.json.tool;\n\tfor (const tool of mcpTools) {\n\t\tconst prefixedName = buildMcpToolName(node.name, tool.name);\n\t\tif (toolName !== prefixedName) continue;\n\n\t\tconst { tool: _, ...toolArguments } = item.json;\n\t\tconst schema: JSONSchema7 = tool.inputSchema;\n\t\tconst sanitizedToolArguments: IDataObject =\n\t\t\tschema.additionalProperties !== true\n\t\t\t\t? pick(toolArguments, Object.keys(schema.properties ?? {}))\n\t\t\t\t: toolArguments;\n\n\t\tconst result = await client.callTool(\n\t\t\t{ name: tool.name, arguments: sanitizedToolArguments },","sourceCodeStart":208,"sourceCodeEnd":244,"githubUrl":"https://github.com/n8n-io/n8n/blob/5ac6606e81f67bb9534255570cd4e86fd8101eee/packages/@n8n/nodes-langchain/nodes/mcp/shared/runtime.ts#L208-L244","documentation":"Error \"Tool name not found in item.json.tool or item.tool\" thrown in n8n-io/n8n.","triggerScenarios":"Thrown at packages/@n8n/nodes-langchain/nodes/mcp/shared/runtime.ts:226 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"5ac6606e81f67bb9534255570cd4e86fd8101eee","analyzedAt":"2026-08-12T05:26:35.080Z","schemaVersion":2},"datasetVersion":"2026-08-13T19:17:28.613Z"}