You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: seps/2084-primitive-groups.md
+11-2Lines changed: 11 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -22,12 +22,21 @@ Groups are named collections of MCP primitives: tools, prompts, resources, tasks
22
22
- A server with many tools could separate them by functionality such as "Pull Requests", "Issues", "Actions".
23
23
- A server with various reference programming resources could separate them by language, like "Python", "TypeScript, and "Kotlin".
24
24
25
-
#### NOTE
25
+
#### Groups are overlapping sets NOT hierarchies
26
26
27
27
- Primitives can belong to multiple groups; for instance, if tools are grouped by use case, a `spell_check` tool might appear in both `compose_email` and `compose_document` groups.
28
28
- Since groups are a primitive, they may belong to multiple groups, and so the result is **not a hierarchy** but rather, potentially overlapping sets.
29
29
- Server developers should take care to avoid cyclic graphs — e.g., a group belonging to itself or to a child.
30
30
31
+
#### Transitivity
32
+
33
+
- Primitive A is in group B. Group B is in group C. Is primitive A implicitly in group C also?
34
+
- The Transitivity of groups is a matter of client interpretation.
35
+
- In the TypeScript reference implementation, the `communications` group contains `email` and `calendar` groups.
36
+
- When listing the primitives in the `communications` group, I chose to have it display the contents of both children.
37
+
- So `email_thank_contributor` would appear in both `email` and `communications`.
38
+
- Some clients might wish to only show direct children of a group.
39
+
31
40
### Why use Groups?
32
41
33
42
Organizing a server's primitives by functionality or use case enables richer client workflows, wherein certain operations or settings can be applied to multiple primitives concurrently. Some use cases [identified by the community](https://github.com/modelcontextprotocol/modelcontextprotocol/discussions/1772) include:
@@ -177,7 +186,7 @@ Response:
177
186
178
187
### Changes to Response Formats
179
188
180
-
As mentioned above, all primitives have a new property that appears in their list result. This includes `tools/list`, `resources/list`, `prompts/list`, `tasks/list`.
189
+
As mentioned above, all primitives have a new property that appears in their list result. This includes `tools/list`, `resources/list`, `resources/templates/list`, `prompts/list`, `tasks/list`.
181
190
Here is an example tool definition from `tools/list` response with new groups property:
0 commit comments