McpServerPrimitiveCollection needs transactions/updates
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
- 48/100
- Loại issue
- Tính năng
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Đình trệ
- Công nghệ
- csharp
- Lĩnh vực
- backend-api-design
Hướng nghiên cứu
Bắt đầu bằng cách xác định McpServerPrimitiveCollection và McpServerOptions, sau đó theo dõi cách Clear và các cập nhật riêng lẻ của collection phát ra các thông báo prompt-list-changed. Hoàn thành có nghĩa là có sẵn một thao tác thay thế collection cho các cập nhật được hỗ trợ bởi cơ sở dữ liệu và thao tác thay thế chỉ tạo ra một thông báo.
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.
I have 1.2 preview.1 and configured client and server to communicate prompt list changed notifications.
// A saved copy of the prompts specified in McpServerOptions custom config.
public static McpServerPrimitiveCollection<McpServerPrompt> Prompts { get; set; }
By adding a prompt here it sends a prompt changed notification to client just fine.
If you are reading from a database though, Clear will send one followed by one for each entry in the database.
That is a lot of network traffic while the prompt list is updated.
It doesn't seem the changed notification has added/removed for individual items so the full list would need to be asked for each change notification.
Describe the solution you'd like
There should be a Reset or Replace or Set option that takes a collection (i.e. IReadOnlyList<McpServerPrompt>) so only one changed notification is sent to client.
Describe alternatives you've considered
I don't see an alternative because once the McpServerOptions have been configured at startup you can't replace the prompt collection.
Additional context
n/a
- Ngôn ngữ chính
- C#
- Star
- 4.5k
- Fork
- 814
- Merge trung bình
- 9 ngày 19 giờ
- Pull request đã merge (30 ngày)
- 4
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/csharp-sdk
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
modelcontextprotocol/csharp-sdk#1867 ·
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 88/100
modelcontextprotocol/csharp-sdk#1840 · 1 bình luận ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
modelcontextprotocol/csharp-sdk#1836 ·
-
enhancement needs confirmation
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 64/100
modelcontextprotocol/csharp-sdk#678 · 1 bình luận ·
-
enhancement needs confirmation P3 ready for work
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
modelcontextprotocol/csharp-sdk#515 · 6 bình luận · 3 reaction ·
Tất cả issue của modelcontextprotocol/csharp-sdk
Issue tương tự
-
bug
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 75/100
sillsdev/languageforge-lexbox#2665 ·
-
bug documentation frontend
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
azurenoops/spin_agent#975 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 86/100
-
:watch: Not Triaged 11.0 fundamentals/subsvc
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 92/100
dotnet/AspNetCore.Docs#37699 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
SubtitleEdit/subtitleedit#15108 · 1 bình luận ·