modelcontextprotocol / modelcontextprotocol/java-sdk

Add group to tools

未关闭
#268 5 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

enhancement P3
主要语言
Java
星标
3.7k
派生
1.1k
平均合并
1 天 15 小时
30 天内合并 PR
9

描述

Hello, I would like to add a group request endpoint, and mark which group it belongs to when registering tools. When using the SSE endpoint, describe the group in the path or parameters. When the client pulls the tool list, it returns the tools of the specified group (if no group is specified, all are returned).

I expect to solve the problem:

1 When a server has many tools, I don't want to use multiple endpoints to group these tools, which is simpler when used in a framework like Spring.
2 Configure different groups to express different agents by obtaining different tool lists.

Note: Alternatively, add a group by interface to handle the group names passed by the SSE endpoint. This interface receives the group name and tools list context, and returns the tools list corresponding to the group name.

贡献指南

打开贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

调研方向

首先跟踪现有的 SSE 端点、工具注册流程和工具列表响应。在决定采用端点变更还是分组接口之前,先检查当前如何处理请求参数和已注册工具。完成标准是:服务器可以按组注册工具,通过 SSE 请求一个组,并在未指定组时接收该组或所有工具。

由索引模型根据 Issue 内容生成。

评估

技术栈
java
领域
api, backend-api-design
Issue 类型
功能
难度
4/5
预计耗时
3-5 天
活跃度
停滞
描述清晰度
基本清楚
新手友好度
35/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。