Skip to content

Commit aadf095

Browse files
committed
* Clarification about transitivity
* add resources/templates/list to the Changes to Response Formats section
1 parent 03b286f commit aadf095

1 file changed

Lines changed: 11 additions & 2 deletions

File tree

seps/2084-primitive-groups.md

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,21 @@ Groups are named collections of MCP primitives: tools, prompts, resources, tasks
2222
- A server with many tools could separate them by functionality such as "Pull Requests", "Issues", "Actions".
2323
- A server with various reference programming resources could separate them by language, like "Python", "TypeScript, and "Kotlin".
2424

25-
#### NOTE
25+
#### Groups are overlapping sets NOT hierarchies
2626

2727
- 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.
2828
- Since groups are a primitive, they may belong to multiple groups, and so the result is **not a hierarchy** but rather, potentially overlapping sets.
2929
- Server developers should take care to avoid cyclic graphs — e.g., a group belonging to itself or to a child.
3030

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+
3140
### Why use Groups?
3241

3342
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:
177186

178187
### Changes to Response Formats
179188

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`.
181190
Here is an example tool definition from `tools/list` response with new groups property:
182191

183192
```json

0 commit comments

Comments
 (0)