Skip to main content

Tool Selection Strategy

Experimental Feature

Tool Selection Strategy is an experimental feature and currently only tested with Claude models. Behavior and configuration may change in future releases.

When you enable an extension, you gain access to all of its tools. For example, the Google Drive extension provides tools for reading documents, updating permissions, managing comments, and more. By default, Goose loads all tools into context when interacting with the LLM.

Enabling multiple extensions gives you access to a wider range of tools, but loading a lot of tools into context can be inefficient and confusing for the LLM. It's like having every tool in your workshop spread out on your bench when you only need one or two.

To manage this more efficiently, you can enable a tool selection strategy. Instead of loading all tools for every interaction, it loads only the tools needed for your current task. This ensures that only the functionality you need is loaded into context, so you can keep more of your favorite extensions enabled. This provides:

  • Reduced token consumption
  • Improved LLM performance
  • Better context management
  • More accurate and efficient tool selection

Tool Selection Options

OptionSpeedBest ForHow It Works
DisabledFastestFew extensions, simple setupsLoads all tools from enabled extensions
EnabledSlowerMany extensions, complex queriesUses LLM intelligence to select relevant tools
tip

You can also use tool permissions to limit tool use.

Disabled (Default)

When tool selection strategy is disabled, Goose loads all tools from enabled extensions into context. This is the traditional behavior and works well if you only have a few extensions enabled.

Best for:

  • Simple setups with few extensions
  • When you want all tools available at all times
  • Maximum tool availability without selection logic

Enabled (LLM-based Strategy)

When enabled, Goose uses LLM intelligence to analyze your query and select only the most relevant tools from your enabled extensions. This reduces token consumption and improves tool selection accuracy when you have many extensions enabled.

Best for:

  • Complex or ambiguous queries that require understanding context
  • Setups with many extensions enabled
  • When you want more accurate tool selection and reduced token usage

Example:

  • Prompt: "help me analyze the contents of my document"
  • Result: Intelligently selects document reading and analysis tools while ignoring unrelated tools like calendar or email extensions

Configuration

  1. Click the button in the top-left to open the sidebar
  2. Click the Settings button on the sidebar
  3. Click the Chat tab
  4. Under Tool Selection Strategy, choose your preferred option:
    • Disabled - Use the default tool selection strategy
    • Enabled - Use LLM-based intelligence to select tools

Environment Variable Configuration

You can also configure tool selection using environment variables or in your configuration file:

# Enable LLM-based tool selection
export GOOSE_ENABLE_ROUTER=true

# Disable (use default behavior)
export GOOSE_ENABLE_ROUTER=false

Or in your config.yaml file:

GOOSE_ENABLE_ROUTER: 'true'