Problem / Use Case
When building AI Agent workflows in n8n for SaaS products, I often need to give users the ability to enable or disable specific tools based on their subscription plan or personal settings.
Currently, tool connections to the AI Agent node are static — they must be wired on the canvas at design time. There is no native way to conditionally include or exclude a tool at runtime.
The two existing workarounds both have significant drawbacks:
-
System Prompt control — Tell the agent “only use ENABLED tools” via system message. This works in theory, but is not reliable: it depends 100% on LLM compliance, and a hallucinating model may still attempt to call a DISABLED tool.
-
Switch node + multiple AI Agent nodes — Create one AI Agent branch per tool combination. This works reliably, but combinatorially explodes: with 10 independently toggle-able tools, you get up to 2^10 = 1024 possible branches. Completely impractical.
Proposed Feature
Add support for dynamic tool connections in the AI Agent node. A few possible approaches:
Option A: Conditional tool input
Allow each tool connection slot to accept a boolean expression or condition. If the condition evaluates to false at runtime, that tool is excluded from the agent’s tool list for that execution.
Option B: Tool list as a data input
Allow the AI Agent node to accept a dynamic list of enabled tool names/IDs via a data input pin. The agent would only expose tools whose names appear in that list.
Option C: “Tool enabled” toggle per tool node
Add an Enabled expression field on each tool sub-node (similar to how items can be disabled in other nodes), so you can pass {{ $json.toolA_enabled }} directly.
Why This Matters
This is a common pattern in multi-tenant SaaS built on n8n:
- Different users have different plans → different tool access
- Feature flags need to be enforced at the infrastructure level, not just the prompt level
- The current workarounds scale very poorly
A dynamic tool connection mechanism would make n8n significantly more production-ready for AI Agent use cases.
Votes appreciated if you’ve hit this limitation too!