Proposal: support for sending `tools/list_changed` notifications manually
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức phù hợp với người mới
- 55/100
Hướng nghiên cứu
Bắt đầu bằng cách theo dõi cách AddTools và RemoveTools kích hoạt các thông báo tools/list_changed trong Go SDK. Xác định đường dẫn thông báo của máy chủ và xác định cách một bên gọi có thể yêu cầu cùng thông báo đó khi các công cụ đã được đăng ký trước khi máy chủ khởi động. Hoàn tất khi các bên gọi có thể gửi thủ công thông báo mà không cần thêm hoặc xóa một công cụ giả, với hành vi được các bài kiểm thử liên quan bao quát.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Is your feature request related to a problem? Please describe.
At the moment in this library it seems to only be possible to send a tools/list_changed notifications when one of two events are triggered: AddTools and RemoveTools. In the GitHub MCP Server we would like to extend this so that these notifications can be sent when other conditions occur such as a mismatch in the version of the MCP server in a session and the client. At this point in time, this does not seem to be possible.
Describe the solution you'd like
For context, we create a new mcp.Server instance per request, since each user may have different tools depending on factors such as their license, the client the token was minted for, if they are a staff user, or if they have a feature toggled on. Because we construct a server for each request, we never add new tools to a server, they are simply there before the server is started.
That being said, we do need a way of notifying clients that new tools are available when they are released. We're looking at doing this via this notification when the available tools differ from what is stored in their session (which is handled outside the scope of the MCP server's internal sessions.)
Describe alternatives you've considered
-
Forcing tool registration changes: We considered artificially adding/removing a dummy tool to trigger the notification, but this is hacky and pollutes the tool list unnecessarily.
-
We've also looked at intercepting requests and return a 400, invalidating a MCP session and theoretically having the client reinitialise their connection thereby getting a new tool list. In practice this is not well supported, while this works in VSCode for example, in Claude Code it results in a persistent broken connections until the agent runtime is restarted.
cc @omgitsads
- Ngôn ngữ chính
- Go
- Star
- 5.2k
- Fork
- 594
- Merge trung bình
- 1 ngày 19 giờ
- Pull request đã merge (30 ngày)
- 63
Chuẩn bị môi trường
Khởi chạy dev container của dự án ngay trên trình duyệt, bằng tài khoản GitHub của bạn.
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của modelcontextprotocol/go-sdk
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
modelcontextprotocol/go-sdk#1444 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Session-lifecycle bookkeeping logs at info, spamming multiple log lines per request on stateless streamable HTTPCó thể đã có người làm @anneheartrecord đã nhận 58 ngày trước. Đang mởP3
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
modelcontextprotocol/go-sdk#1204 · 1 reaction ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Expose generic `SendNotification` on `ServerSession` for custom protocol extensionsCó thể đã có người làm @ajuijas đã nhận 224 ngày trước. Đang mởneeds investigation
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
modelcontextprotocol/go-sdk#745 · 13 bình luận · 1 reaction ·
Maintainer thường phản hồi trong vòng 1 ngày
-
mcp: notifications and interrupted calls lose ErrConnectionClosedCó thể đã có người làm @Jackmeson1 đã nhận 1 ngày trước. Đang mở
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 30/100
modelcontextprotocol/go-sdk#1448 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
mcp: LoggingHandler drops records logged at custom slog levelsCó thể đã có người làm @kaankucukx đã nhận 1 ngày trước. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 45/100
modelcontextprotocol/go-sdk#1445 ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của modelcontextprotocol/go-sdk
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
eugenioenko/ttt#1206 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
t:urlDecodeUni does not map U+3002 and U+FF61 to a dot, unlike ModSecurityCó thể đã có người làm @fzipi đã nhận hôm nay. Đang mởbug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
peasant-labs/peasant#738 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Duplicate review still bridges two books through a bundle whose first part has a colon subtitleCó thể đã có người làm @vavallee đã nhận hôm nay. Đang mởarea:library-scan bug priority:low
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 83/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
Maintainer thường phản hồi trong vòng 1 ngày