Skip to content

Dynamic OS MCP Tool Filtering for Agents#44

Open
wrigleyDan wants to merge 1 commit intoopensearch-project:mainfrom
wrigleyDan:mcp-tool-filtering-per-agent
Open

Dynamic OS MCP Tool Filtering for Agents#44
wrigleyDan wants to merge 1 commit intoopensearch-project:mainfrom
wrigleyDan:mcp-tool-filtering-per-agent

Conversation

@wrigleyDan
Copy link
Collaborator

Description

Add dynamic tool filtering for tools exposed by the OS MCP server. Tools can be configured and filtered per agent. By default the fallback agent has access to all exposed tools. ART and its specialized agents have a subset configured corresponding to their needs.

The tool filtering works on a category level (using the existing category names core_tools and search_relevance).

ART and its specialized have a subset of the available tools included as not every specialized agent needs access to all tools. For example, the agent analyzing UBI data does not need any Search Relevance Workbench tools, so it relies on core_tools only.

Issues Resolved

closes #20

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

…ols can be configured and filtered per agent. By default the fallback agent has access to all exposed tools. ART and its specialized agents have a subset configured corresponding to their needs.

Signed-off-by: wrigleyDan <dwrigley@opensourceconnections.com>
@jiapingzeng
Copy link
Collaborator

jiapingzeng commented Mar 23, 2026

Thanks for working on this much needed feature. However, since tool groups already exist on the MCP server, wonder if it could be better to somehow let MCP server expose its tool groups (opensearch-project/opensearch-mcp-server-py#169) so that we do not need to hard code sets of tools on the agent side. In the future, if we update the tool groups on the MCP server, we wouldn't need to update it here again.

Not entirely sure if it is possible from MCP server side but I was thinking through header, kind of like the header auth mechanism.

Ok to proceed with the current approach due to time limitation but curious what you think.

@wrigleyDan
Copy link
Collaborator Author

A header-based approach where agents can request the tools they need makes sense to me.
I think this mechanism could benefit from being not only restricted to groups. Our agent is a good example: Not all agents use all tools that the MCP server provides as part of the search_relevance group of tools.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add per-agent MCP tool filtering

2 participants