-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Description
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.