n8n-nodes-smart-browser-automation 1.6.2 → 1.6.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -171,6 +171,13 @@ class SmartBrowserAutomation {
|
|
|
171
171
|
});
|
|
172
172
|
return [returnData];
|
|
173
173
|
}
|
|
174
|
+
// Validate tool exists before executing
|
|
175
|
+
const availableTools = await sessionManager.listTools();
|
|
176
|
+
const toolExists = availableTools.some((tool) => tool.name === toolName);
|
|
177
|
+
if (!toolExists) {
|
|
178
|
+
const availableToolNames = availableTools.map((t) => t.name).join(', ');
|
|
179
|
+
throw new n8n_workflow_1.NodeOperationError(this.getNode(), `Tool '${toolName}' does not exist. Available tools: ${availableToolNames}`);
|
|
180
|
+
}
|
|
174
181
|
// Execute the tool via MCP
|
|
175
182
|
const result = await sessionManager.callTool(toolName, toolParams);
|
|
176
183
|
returnData.push({
|