npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

n8n-nodes-tool-switcher

v0.1.5

Published

n8n community node that dynamically selects which AI tools to provide to an Agent based on configurable rules

Downloads

476

Readme

n8n-nodes-tool-switcher

Tool Switcher is an n8n community node that dynamically selects which AI tools to provide to an Agent based on configurable rules. Unlike a simple switch, it evaluates all rules and returns all tools whose conditions are satisfied — giving your AI Agent exactly the right set of capabilities for each situation.

Tool Switcher in workflow


How It Works

Tool Switcher accepts between 2 and 10 tool inputs. For each input you define one or more rules — each rule pairs a tool with a set of conditions (using n8n's built-in filter with AND/OR combinators).

At runtime, the node:

  1. Iterates through every rule in order.
  2. Evaluates the rule's conditions against the current item's data.
  3. Collects the tool if its conditions are met.
  4. Returns all collected tools as an array to the connected AI Agent.

Key difference from Model Selector: Model Selector evaluates rules and returns the first matching model. Tool Switcher evaluates all rules and returns every tool whose conditions are met. This means multiple tools can be active simultaneously, giving the Agent a dynamic, context-aware toolset.


Installation

Via n8n UI (recommended)

  1. Open your n8n instance.

  2. Go to Settings → Community Nodes.

  3. Click Install a community node.

  4. Enter the package name:

    n8n-nodes-tool-switcher
  5. Click Install and restart n8n when prompted.

Via npm (self-hosted)

npm install n8n-nodes-tool-switcher

Then restart your n8n instance.


Usage

Step-by-step

  1. Add the node — search for Tool Switcher in the node panel and drag it into your workflow.
  2. Set the number of inputs — use the Number of Inputs parameter to choose how many tool slots you need (2–10).
  3. Connect tools — attach any n8n AI tool nodes (e.g., Calculator, HTTP Request, Code) to the Tool Switcher's input connectors.
  4. Configure rules — click Add Rule for each tool you want to conditionally include:
    • Select the Tool input slot from the dropdown.
    • Define Conditions using n8n's filter UI (supports string, number, boolean comparisons with AND/OR logic).
  5. Connect the output — wire the Tools output to the Tools input of an AI Agent node.

The Agent will receive only the tools whose conditions were satisfied for the current item.


Configuration

| Parameter | Type | Default | Description | |-----------|------|---------|-------------| | Number of Inputs | Number | 2 | How many tool input connectors to expose (2–10). | | Rules | Fixed Collection | — | One or more rules. Each rule contains a Tool selector and a Conditions filter. All rules are evaluated; all matching tools are returned. |

Rule fields

| Field | Description | |-------|-------------| | Tool | Selects which input slot (Tool 1 … Tool N) this rule applies to. | | Conditions | A filter expression (supports AND/OR, all n8n data types). The tool is included when the expression evaluates to true. |


Comparison with Model Selector

| Feature | Model Selector | Tool Switcher | |---------|---------------|---------------| | Output type | AI Model | AI Tool(s) | | Number of outputs | One (first match) | All matching | | Rule evaluation | Stops at first match | Evaluates every rule | | Use case | Pick the right LLM | Pick the right set of tools | | Multiple simultaneous results | No | Yes |

Use Model Selector when you need to route to a single language model.
Use Tool Switcher when you need to give an Agent a dynamic, multi-tool arsenal based on runtime conditions.


License

MIT © 2026 Elijah Zobenko

See the LICENSE file for full terms.


Links