Enable Tool Filtering via Extension Configuration File
Please explain the motivation behind the feature request. Goose allows MCP servers to be registered as extensions. The tools provided by an MCP server are listed and can be included in LLM API requests. However, we frequently encounter situations where the number of tools is excessive or their relevance to the context is low.
For example:
- When coding a system without a UI, the screenshot tool from the developer extension is unnecessary.
- The GitHub MCP server has around 40 tools, which is a very large number. Goose recommends limiting tools to 25.
This feature aims to address the problem of an overwhelming number of irrelevant tools being presented to the LLM, leading to inefficient processing and potentially poorer results. By allowing users to filter tools via a configuration file, we can provide a more focused and relevant set of tools to the LLM. This will improve the efficiency and accuracy of LLM responses by reducing unnecessary noise and irrelevant information.
Describe the solution you'd like I propose implementing a mechanism that allows users to filter tools through a configuration file. This would involve:
- Defining a configuration format: A new section in the extension's configuration file where users can explicitly list the tools they wish to enable or disable.
- Tool filtering logic: Goose would read this configuration and only include the specified tools when generating the list for LLM API requests.
For example, a user could specify a whitelist of desired tools, or a blacklist of tools to exclude. This approach offers a simple, intuitive, and user-controlled method for managing the available tools.
Describe alternatives you've considered I am aware of more advanced approaches being explored, such as those mentioned in https://block.github.io/goose/docs/guides/tool-router/:
- Filtering using indexing and vector search.
- Filtering using a lightweight LLM.
While these are valid and promising approaches, my proposed solution of filtering via a configuration file offers a very simple implementation and provides users with intuitive and precise control. Furthermore, this approach is not in conflict with vector search or other sophisticated methods; rather, it can function complementarily, offering a foundational layer of explicit control.
Additional context I have verified this does not duplicate an existing feature request.
This would be a great enhancement for MCP users. Some MCP servers like Github MCP have around 80 tools in them and I don't even need half of them. It'd be really helpful to filter through these tools.
We should do this via recipes along with Goose wide configuration files. If it's easier to do it via recipes in the short term, we should prioritize that.
Doesn't specifically implement this request but recipes now have an available_tools parameter which filters the tools the agent is allowed to use for a given extension. https://block.github.io/goose/docs/guides/recipes/recipe-reference/#extension-fields
you can actually go into the settings on the desktop and hit the gear icon under approve mode for manual and go through the list and set them enabled or no. but I like the suggestion here; it should just be integrated directly into the MCP server overview
it should just be integrated directly into the MCP server overview
can you clarify the suggestion here @DOsinga?
oh my suggestion was that if you click on an mcp server in extensions it could show you all the tools it advertises and then you could disable them there. however since tools are dynamic in MCP I don't know how actionable that is. given the discussions we've had here, I think we can close this now