Dynamic (runtime) tool selection per user/tenant in AI Agent node

Dynamic (runtime) tool selection per user/tenant in AI Agent node

The idea

Allow dynamic (runtime) selection/activation of tools in the AI Agent node (or tool-enabled agent workflows) per execution, based on the current user/tenant context.

In other words: the Agent’s available tools should be computed at runtime (e.g., “for this user, attach tools A + C + D; for another user, attach B + E”).

What “dynamic” should mean

  • Tools can be enabled/disabled per execution based on an expression/condition (e.g., userId, tenant/companySlug, roles/permissions, plan/tier, feature flags, onboarding state, org settings, etc.).
  • Disabled tools should not be visible to the agent and must not be callable (hard security boundary).
  • The execution log should clearly show which tools were enabled for that specific run.

My use case (not credential-focused)

I build multi-tenant / multi-user agent workflows where different users should have different tool sets in general — not just different credentials.

Examples:

  • User A is allowed to use “CRM tools” + “Email drafting tool” + “Knowledge base search”.
  • User B is allowed to use “Support ticket tools” + “Order lookup tool”, but not CRM tools.
  • User C is on a lower plan and should not see “expensive tools” (e.g., advanced web search, heavy data enrichment, certain internal endpoints).

Today, tools are configured statically at design time, which forces me to:

  • duplicate agent nodes/workflows, or
  • build complex routing around the agent to simulate different tool sets.

Suggested UX / implementation options

  1. Per-tool “Enabled” toggle that supports an expression (boolean).
  2. A “Tools” field that supports an expression returning a list of tools (or tool IDs) to attach for this run.
  3. Tool Groups with conditional activation (e.g., “CRM group enabled only for users with role sales”).

Why this would be beneficial

  • Enables true multi-tenant agent workflows with per-user personalization
  • Reduces workflow duplication and maintenance
  • Improves reliability (agent won’t attempt tools that aren’t applicable/allowed)
  • Improves security (principle of least privilege: tools are only available when explicitly allowed)
  • Makes it feasible to offer “one workflow for many users” products built on n8n agents

Willing to help

I can help with detailed requirements, UX proposals, and testing.