SEP-2084: Primitive Grouping#2084
SEP-2084: Primitive Grouping#2084chughtapan wants to merge 84 commits intomodelcontextprotocol:mainfrom
Conversation
This SEP introduces a new server capability called Groups, which organizes MCP primitives into named collections for better client workflows and access control. It includes specifications for group capabilities, schema, discovery methods, and notifications.
Added a new 'groups' property to the primitive definition for better organization of primitives within groups.
Updated the SEP-0000 document to clarify the grouping of primitives and added acknowledgements.
Added a section on security implications to the document.
…cknowledgement with Pat White's github. Tweaked a
…ly in the Rationale section, no need to discuss anything but the actual proposal at the top.
… group memberships
|
As per #2204, this was rejected by Core Maintainers. The main feedback was that the ecosystem around searching tools is quickly evolving and it's unclear what mechanism is the right one in the longrun. The Core maintainers take a careful stance here to not too early standardize a pattern while the patterns in the de-facto implementations are still evolving. This does not mean that this proposal is not good, it just means it might be too early for it. |
I would like to add that after 4 months of participation (work) by the working group members...e.g. dev community input of use cases, meetings, discussions as referenced, draft creation, experiments, comments above by @bdoyle0182 and others...particularly around/with server-side use cases for primitive grouping, was ignored by the authors of SEP-2084, who emphasized client side search in this proposal...only to be rejected by the core maintainers. |
|
Spec feedback: #2204 |
Description
This SEP proposes Groups, a new server capability and primitive, to organize tools, prompts, resources, tasks, and groups themselves, into named collections.
Motivation and Context
Organizing a server's primitives by functionality or use case enables richer client workflows, wherein certain operations or settings to be applied to multiple primitives concurrently.
An example would be client-side filtering by group, where a client allows the user to choose which groups to interact with and which to ignore. Only primitives included in the selected groups would be presented to an LLM, reducing context overload by omitting functionality that the user knows isn't relevant to the task at hand.
Reference Implementation
The reference implementation's example client and server demonstrate how groups, tools, prompts, and resources can be grouped on the server, and the client can filter them by group. It manually demonstrates how an agent using the server could easily reduce the tokens placed into an LLM's context by only including the primitives in one or more groups rather than providing the full list.
Note: For the sake of simplicity, Tasks and Resource Templates are not included in the demo, but the reference implementation supports grouping of both.
Group-aware Client / Server Example
The Menu
List All Primitives
This is an exhaustive list of all the primitives defined by the example.
Filtering by Group
List a Parent Group's Contents
Enter a group name and see all the primitives it contains. Note that client display depth defaults to 2, so the contents of the parent group and all of its child groups are shown.
Filter all by a leaf group
Listing the contents of a group that has no groups as children.
Enter a command or a list of groups to filter by: todos Tools: - todos_add — Add a todo item. - todos_complete — Mark a todo item complete. Resources: - todos_overview — A short overview of task management basics. Prompts: - todos_plan_day — Turn a list of tasks into a simple day plan.Adjusting Client Display Depth
The example server only defines groups to a depth of 2. The client will find the deepest group and default to that number for display depth.
Client Display Depth: 1
Only shows the contents of the group but not of any child groups it contains.
Client Display Depth: 2
Shows the contents of the group and of all child groups it contains.
Breaking Changes
None
Types of changes
Checklist
Additional context
N/A