Make `ToolsFeature` building blocks reusable

Đang mở
#1,320 1 bình luận 0 reaction 0 người được giao Xem trên GitHub

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ó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
48/100
Loại issue
Tái cấu trúc
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
java
Lĩnh vực
backend-api-design

Hướng nghiên cứu

Read ToolsFeature and trace how it handles tools/call, including RequiredCapabilities.check, Mcp-Param validation, schema validation, and structured content. Identify the per-call steps that can be reused while preserving current ToolsFeature behavior; done means the extracted pieces support another feature without implementing Tasks (#1013).

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

area/server modern P2
Context

In #1013, the plan is for Tasks (SEP-2663) to be a feature of its own that replaces ToolsFeature entirely instead of wrapping it (comment).

To do that without copying ToolsFeature, the logic it applies around a tools/call needs to be reusable.

Proposal

Pull the per-call steps out of ToolsFeature so that another feature can build on them:

  • Required client capabilities check (RequiredCapabilities.check)
  • Mcp-Param header validation against the tool's annotations
  • Input validation against inputSchema (returned as an isError tool result)
  • Output validation against outputSchema, and filling in content from structuredContent

ToolsFeature should keep working exactly as it does today, built on top of these pieces.

Out of scope
  • The Tasks feature itself (#1013)
Ngôn ngữ chính
Java
Star
3.8k
Fork
1.1k
Merge trung bình
1 ngày 3 giờ
Pull request đã merge (30 ngày)
38

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. 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.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của modelcontextprotocol/java-sdk

Tất cả issue của modelcontextprotocol/java-sdk

Issue tương tự

Thêm issue về Java

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.