n8n-io/n8n · error · OperationalError
Require a sessionId for the listing of tools
Error message
Require a sessionId for the listing of tools
What it means
Error "Require a sessionId for the listing of tools" thrown in n8n-io/n8n.
Source
Thrown at packages/@n8n/nodes-langchain/nodes/mcp/McpTrigger/McpServer.ts:600
} catch (error) {
this.logger.warn(
`Credential gate elicitation failed, falling back to text response: ${
error instanceof Error ? error.message : String(error)
}`,
);
}
}
if (this.resolveFunctions[callId]) this.resolveFunctions[callId]();
return MessageFormatter.formatCredentialGate(gateResult);
}
private setupHandlers(server: Server): void {
server.setRequestHandler(
ListToolsRequestSchema,
(_, extra: RequestHandlerExtra<ServerRequest, ServerNotification>) => {
if (!extra.sessionId) {
throw new OperationalError('Require a sessionId for the listing of tools');
}
const tools = this.sessionManager.getTools(extra.sessionId) ?? [];
return {
tools: tools.map((tool) => ({
name: tool.name,
description: tool.description,
// 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) {View on GitHub (pinned to 5ac6606e81)
When it happens
Trigger: Thrown at packages/@n8n/nodes-langchain/nodes/mcp/McpTrigger/McpServer.ts:600 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/d52330ba46816f65.
Report an issue: GitHub.