Skip to content

[FEATURE] Support filtering tools from one or multiple MCP servers #481

@jer96

Description

@jer96

Problem Statement

After reaching through the thread of the parent issue and offline feedback, having the ability to customize and filter MCP tools before they are provided to the agent would be advantageous

Proposed Solution

Adding on to this, I believe we can expand the requirements to include a Filtering mechanism. Currently there is not mechanism for customers to filter based on tools properties. This may be at the MCP level, but it may also be something that we want to expand to be included in AgentTool.

I see two approaches

mcp_client.list_tools_sync(filters=[...]

or

[tool for tool in mcp_client.list_tools_sync() if tool.is_read_only()]

https://modelcontextprotocol.io/docs/concepts/tools#available-tool-annotations

Use Case

  • Shortlisting an agent's tools
  • Dynamically updating agent's tools based on context

Alternatives Solutions

Additional Context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions