n8n-io/n8n · error · OperationalError

Require a name and arguments for the tool call

Error message

Require a name and arguments for the tool call

What it means

Fires in the MCP server's CallToolRequest handler when a client invokes a tool without supplying the tool name or its arguments object. It is a generic request-shape guard: a tool call must carry params.name and params.arguments, and anything else cannot be dispatched to a registered tool, so the handler fails the request instead of looking up the tool.

Solutions

  1. Send both params.name and params.arguments (an empty object is valid) in the CallTool request
  2. Fix the client/proxy that drops empty arguments objects
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at packages/@n8n/nodes-langchain/nodes/mcp/McpTrigger/McpServer.ts:626 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/278f589cd6be29ec. Report an issue: GitHub.

Appendix: source

Thrown at packages/@n8n/nodes-langchain/nodes/mcp/McpTrigger/McpServer.ts:626

						// eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-argument
						inputSchema: zodToJsonSchema(tool.schema as any, {
							removeAdditionalStrategy: 'strict',
						}),
					})),
				};
			},
		);

		server.setRequestHandler(CallToolRequestSchema, async (request, extra) => {
			if (!extra.sessionId) {
				throw new OperationalError('Require a sessionId for the tool call');
			}

			const callId = extra.requestId ? `${extra.sessionId}_${extra.requestId}` : extra.sessionId;

			try {
				if (!request.params?.name || !request.params?.arguments) {
					throw new OperationalError('Require a name and arguments for the tool call');
				}

				const toolName = request.params.name;
				const toolArguments =
					typeof request.params.arguments === 'object' && request.params.arguments !== null
						? request.params.arguments
						: {};

				const tools = this.sessionManager.getTools(extra.sessionId) ?? [];
				const requestedTool = tools.find((tool) => tool.name === toolName);
				if (!requestedTool) {
					throw new OperationalError('Tool not found');
				}

				// Eager pre-execution credential gate: if the caller has not connected a
				// required private credential, surface the actionable connection URLs
				// (via elicitation when supported, otherwise as text) instead of
				// executing (or enqueuing) the workflow.

View on GitHub (pinned to 5ac6606e81)