More extensible CallToolRequest
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 5/5
- Thời gian dự kiến
- Hơn một tuần
- Mức phù hợp với người mới
- 35/100
- Loại issue
- Tính năng
- Độ rõ ràng
- Cần làm rõ
- Mức độ hoạt động
- Ít trao đổi
- Công nghệ
- java
- Lĩnh vực
- api, backend-api-design
Hướng nghiên cứu
Bắt đầu bằng cách đọc McpJsonMapper.java và theo dõi cách CallToolRequest giải tuần tự các đối số của công cụ. Xác định điểm mở rộng được hỗ trợ cho việc phân tích request dành riêng cho từng công cụ, đồng thời giữ nguyên hành vi hiện có dựa trên map, sau đó xác minh hành vi đã chọn bằng các bài kiểm thử giải tuần tự request liên quan.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Expected Behavior
We want to define our own tool-specific requests with own parsers for 'params'.
Current Behavior
The arguments for tool calls are always Maps.
Context
We develop our own MCP server that offers features like querying and we have our own set of tools to parse, validate and execute them.
The problem is that request object is always de-serialised as a map and we need to serialise it back or figure out a way to reconstruct our objects from the maps. It works most of the time, but is rather inconvenient for queries.
There is https://github.com/modelcontextprotocol/java-sdk/blob/main/mcp-core/src/main/java/io/modelcontextprotocol/json/McpJsonMapper.java, but as far as I understand, it is mainly used to decouple Jackson from the rest of the code.
We could have used that but it looks rather technical.
What I would like to have: some way to define my own request objects and make their payloads shallow or leave them unparsed so the each individual tool can later parse its payload and decide what to do. Or stick with standard map-based one if that is fine for it.
- Ngôn ngữ chính
- Java
- Star
- 3.7k
- Fork
- 1.1k
- Merge trung bình
- 1 ngày 15 giờ
- Pull request đã merge (30 ngày)
- 9
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/java-sdk
-
area/transport bug P2
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
modelcontextprotocol/java-sdk#1136 ·
-
area/client bug P2
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
modelcontextprotocol/java-sdk#1124 · 1 bình luận ·
-
ServerCapabilities.logging is added unconditionally, overriding the caller's explicit capabilities Đang mởbug P2 ready for work
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
modelcontextprotocol/java-sdk#1086 · 1 bình luận ·
-
enhancement good first issue P3
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
modelcontextprotocol/java-sdk#1067 ·
-
bug P2 ready for work
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
modelcontextprotocol/java-sdk#898 · 1 bình luận ·
Tất cả issue của modelcontextprotocol/java-sdk
Issue tương tự
-
Bug Java Platform: Java
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
getsentry/sentry-java#6138 · 1 bình luận ·
-
bug needs triage p2
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
GoogleCloudPlatform/DataflowTemplates#4273 · 1 bình luận ·
-
[Studio][Bug] Bulk-deleting a full page of alert rules steps the page back while more rules remain Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
apache/rocketmq-dashboard#4654 · 1 bình luận ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100