Repository navigation
Use Cases for Grouping of Tools, Prompts, Resources #1772
Replies: 10 comments 4 replies
|
A new-to-me use case having to do with server-side governance (of tools and resources) is described in this link |
|
MCP 'Gateway' Server Use Cases for Grouping There are a number of use cases for grouping having to do with providing an MCP Gateway Server that exposes sets/groups of Tools, Resources, and Prompts (as well as other services) that are actually implemented by a service provider via an architecture like this: graph TD
MCP_Client[MCP Client]<--> MCP_Gateway_Server[MCP Gateway Server: Tools, Resources, Prompts]
subgraph Existing Services as Tools
subgraph ToolGroup
Other_MCP_Servers[Other MCP Servers]
REST_API[Rest API]
DB[Database]
end
Other_Models[Other Models or Agents]
Legacy[Legacy Services]
Proxy[Proxied Services]
Other[Other Services]
end
MCP_Gateway_Server<---> Other_MCP_Servers
MCP_Gateway_Server<---> REST_API
MCP_Gateway_Server<--->DB
MCP_Gateway_Server<--->Other_Models
MCP_Gateway_Server<--->Legacy
MCP_Gateway_Server<--->Proxy
MCP_Gateway_Server<--->Other
Considering Tools only, there are many scenarios where it would be valuable for the MCP Server Gateway to 'wrap' one or more services (or combinations of services) and expose the services on the right as a group of MCP Tools to MCP Clients. This is a kind of facade pattern as the MCP Server Gateway exposes a facade to MCP clients, and that facade/api is actually a number of services...some examples of which are given on the right. With the availability of grouping of tools (for example), defined on the mcp server gateway, new facades, consisting of sets of tools (for example) can be exposed to MCP Clients, taking advantage of existing/available services and/or subsystems. A working example of the use of groups for presenting a facade of tools is given here. As described in the repo readme, an arithmetic 'tool group', with 'add' and 'multiply' Tool implementations is created dynamically on the MCP Server. In the 'remote' examples the ExampleToolGroup instance is a dynamically discovered and created proxy for a remote service implementation. MCP tools are are then created from the proxy at runtime, as is the Arithmetic tool group by the addToolGroups call here One of the assumed requirements for the MCP Gateway Server is the ability to add/remove Groups, Tools, Resources, and Prompts dynamically...i.e. without MCP Gateway Server restart. |
|
A number of use cases presented here having to do with
|
|
We now have tasks. Any use cases we should also consider for the new primitive? It's an async version of tool essentially so i don't know if there would be anything use case wise that is independent of tools for groups, but something to ponder on. |
|
A very interesting examination of (mostly server-side use cases) Some of the use cases presented could be well-supported through a grouping primitive (dev workflows, debugging, testing, documentation, non-dev mcp server creation, discovery). |
|
A Group primitive could help with the problems of Tool-Space Interference as described by this MS Research work: How could grouping help?
|
|
reading through #1300 and the gateway use cases above — there's a pattern on the client side, i've been using skill files as semantic group manifests. this aligns with @scottslewis's governance use case — my config already the thread between gateway facades, governance filtering, and client-side would it help to document how these use cases compose? happy to sketch |
|
A python-sdk extension for MCP server-defined toolgroups is now available: All are welcome to contribute to help drive things forward for the mcp dev community. The toolgroups extension supports both flat and hierarchical tool collections. It makes no assumptions or assertions about client-side concerns such as filtering. The focus of this work is obviously on grouping for tools, but it is designed to be easily used for grouping other MCP primitives. |
|
There is now an implementation of hierarchical toolgroups for the python sdk - prerelease, the typescript sdk, and the latest Java sdk. toolgroups - python All three of the above use the same schema for the Group primitive, making them runtime interoperable (e.g. python servers with typescript clients, etc). Hierarchical or non-hierarchical groupings of tools can be easily added to servers (see e.g. python readme). Servers can easily decide whether to communicate groupings to clients at runtime, or keep for internal server usage only (role-based organizations or internal security boundaries). If additional features desired or issues are found, please open an issue in the relevant repo. All contributions well be welcomed. |
|
We've limited Discussions in this repository to meeting notes and are closing this thread. To continue the conversation, pick a channel from Contributor Communication. Thanks for posting. |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Pre-submission Checklist
Discussion Topic
SEP #1300 was a proposal for adding Groups and Tags support to the MCP protocol specification, specifically for Tools.
One part of the feedback about this proposal from the core maintainers, as summarized here was that a Groups proposal should probably include the ability to Group Prompts, and Resources (i.e. the other existing primitives) as well as Tools.
This discussion is intended so that community input can be provided and recorded (to be used for driving specification and implementation choices) about use cases for a Group primitive (i.e. a notion of a Group in the MCP protocol that can be used with Tools, Resources, and Prompts and possibly others).
For Tool groups specifically, #1300 and #993 have descriptions of relevant use cases...e.g. client organization/presentation/lookup/search tools. Before proposing a new use case in comments for this discussion, please review the discussions on #1300 and #993 to avoid duplication.
As a result of the #1300 review, a new working group has been created: primitive-grouping-wg, Please consider joining this working group and/or engaging people in this working group via the discord channel.
This working group currently meets at 11:30am ET every Monday. See here for meeting information, notes from previous meetings, and upcoming meetings. The working group meetings (and discord channel) are open to all.
The working group meeting on Nov, 3 was focused on discussing grouping use cases. Please see this discussion and attached documents.
This discussion is to solicit and record community input about use cases for grouping of Tools, Prompts, and Resources...and explicitly not to propose or defend specific design or implementations of grouping.
If you have a use case that has not been articulated elsewhere, please consider describing it publicly as a comment in this discussion. Or if you have a use case that has been articulated else where, please express your support for addressing that use case. Clarifying questions about use cases are of course welcome. Please do not denigrate or diminish other commenter's use cases.
As MCP is a protocol specification, it may be useful to categorize your use case as 'client-based' (e.g. organization for human dev clients and/or model clients), or 'server-based' ...e.g. Tool organization, gateway support, orchestration, abstraction, scaling through grouping, etc). Clarity in your use case about 'who/what is/are the users' of the grouping capability will be appreciated.
Presenting a short 'user story' to illustrate your use case is welcome.
The working group will monitor and occasionally summarize this discussion, so that designs/approaches/proposals can be evaluated relative to their ability to address the grouping use cases recorded here and provide input to the specification process.
Thank you for your contribution and participation.
All reactions