{"record":{"id":"278f589cd6be29ec","repo":"n8n-io/n8n","slug":"require-a-name-and-arguments-for-the-tool-call","errorCode":null,"errorMessage":"Require a name and arguments for the tool call","messagePattern":"Require a name and arguments for the tool call","errorType":"exception","errorClass":"OperationalError","httpStatus":null,"severity":"error","filePath":"packages/@n8n/nodes-langchain/nodes/mcp/McpTrigger/McpServer.ts","lineNumber":626,"sourceCode":"\t\t\t\t\t\t// eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-argument\n\t\t\t\t\t\tinputSchema: zodToJsonSchema(tool.schema as any, {\n\t\t\t\t\t\t\tremoveAdditionalStrategy: 'strict',\n\t\t\t\t\t\t}),\n\t\t\t\t\t})),\n\t\t\t\t};\n\t\t\t},\n\t\t);\n\n\t\tserver.setRequestHandler(CallToolRequestSchema, async (request, extra) => {\n\t\t\tif (!extra.sessionId) {\n\t\t\t\tthrow new OperationalError('Require a sessionId for the tool call');\n\t\t\t}\n\n\t\t\tconst callId = extra.requestId ? `${extra.sessionId}_${extra.requestId}` : extra.sessionId;\n\n\t\t\ttry {\n\t\t\t\tif (!request.params?.name || !request.params?.arguments) {\n\t\t\t\t\tthrow new OperationalError('Require a name and arguments for the tool call');\n\t\t\t\t}\n\n\t\t\t\tconst toolName = request.params.name;\n\t\t\t\tconst toolArguments =\n\t\t\t\t\ttypeof request.params.arguments === 'object' && request.params.arguments !== null\n\t\t\t\t\t\t? request.params.arguments\n\t\t\t\t\t\t: {};\n\n\t\t\t\tconst tools = this.sessionManager.getTools(extra.sessionId) ?? [];\n\t\t\t\tconst requestedTool = tools.find((tool) => tool.name === toolName);\n\t\t\t\tif (!requestedTool) {\n\t\t\t\t\tthrow new OperationalError('Tool not found');\n\t\t\t\t}\n\n\t\t\t\t// Eager pre-execution credential gate: if the caller has not connected a\n\t\t\t\t// required private credential, surface the actionable connection URLs\n\t\t\t\t// (via elicitation when supported, otherwise as text) instead of\n\t\t\t\t// executing (or enqueuing) the workflow.","sourceCodeStart":608,"sourceCodeEnd":644,"githubUrl":"https://github.com/n8n-io/n8n/blob/5ac6606e81f67bb9534255570cd4e86fd8101eee/packages/@n8n/nodes-langchain/nodes/mcp/McpTrigger/McpServer.ts#L608-L644","documentation":"Error \"Require a name and arguments for the tool call\" thrown in n8n-io/n8n.","triggerScenarios":"Thrown at packages/@n8n/nodes-langchain/nodes/mcp/McpTrigger/McpServer.ts:626 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"}