Skip to content

Support Tag-Based Tool Filtering in MCP Server #522

@skamalj

Description

@skamalj

Is your feature request related to a problem? Please describe.
When the MCP server registers a large number of tools, the context size grows significantly, which negatively impacts tool selection efficiency and can lead to token limits being hit. This also makes it harder for clients to navigate and select relevant tools.

Describe the solution you'd like
Introduce a decorator-based tagging mechanism that allows tools/functions to be annotated with tags. The list_tools() function can then be made configurable to return tools filtered by these tags. This enables dynamic and contextual tool selection without bloating the context unnecessarily.

Describe alternatives you've considered
Currently, the workaround is to spin up multiple MCP servers with different sets of tools. However, this breaks the unified client experience — clients end up choosing servers instead of tools, which adds unnecessary operational complexity and undermines the flexibility of a centralized tool registry.

Additional context
Actively working on a prototype implementation for this feature.

Metadata

Metadata

Assignees

No one assigned

    Labels

    feature requestRequest for a new feature that's not currently supportedpending SEP approvalWhen a PR is attached as an implementation detail to a SEP, we mark it as such for triage.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions