n8n-io/n8n · error · NodeOperationError
Tool "${tool}" returned an error
Error message
Tool "${tool}" returned an error What it means
Error "Tool "${tool}" returned an error" thrown in n8n-io/n8n.
Source
Thrown at packages/@n8n/nodes-langchain/nodes/mcp/McpClient/McpClient.node.ts:271
const result = (await client.result.callTool(
{
name: tool,
arguments: parameters,
},
undefined,
{
timeout: options.timeout ? Number(options.timeout) : undefined,
},
)) as CallToolResult;
if (node.typeVersion >= 1.1 && result.isError) {
const textContent = result.content.find((item) => item.type === 'text');
const errorMessage =
textContent && 'text' in textContent
? textContent.text
: `Tool "${tool}" returned an error`;
throw new NodeOperationError(node, errorMessage, { itemIndex });
}
let binaryIndex = 0;
const binary: IBinaryKeyData = {};
const content: IDataObject[] = [];
const convertToBinary = options.convertToBinary ?? true;
for (const contentItem of result.content) {
if (contentItem.type === 'text') {
content.push({
...contentItem,
text: jsonParse(contentItem.text, { fallbackValue: contentItem.text }),
});
continue;
}
if (convertToBinary && (contentItem.type === 'image' || contentItem.type === 'audio')) {
binary[`data_${binaryIndex}`] = await this.helpers.prepareBinaryData(
Buffer.from(contentItem.data, 'base64'),View on GitHub (pinned to 5ac6606e81)
When it happens
Trigger: Thrown at packages/@n8n/nodes-langchain/nodes/mcp/McpClient/McpClient.node.ts:271 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of n8n-io/n8n@5ac6606e81 (2026-08-12).
Data as JSON: /api/errors/f49a7c63cf6003e0.
Report an issue: GitHub.