Dual-era servers serve modern Tool schemas unchanged to legacy clients
Maintainer thường phản hồi trong vòng 1 ngày
@Adebayo120 đang làm issue này rồi.
Từ ngày 31/10/2026.
- #1482 của @Adebayo120 — đã đóng, không merge
Đá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
- 38/100
- Loại issue
- Tính năng
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- go
- Lĩnh vực
- api, backend-api-design
Hướng nghiên cứu
Bắt đầu bằng cách theo dõi quá trình thương lượng giao thức, việc đăng ký công cụ và entry point tools/list, sau đó kiểm tra cách Tool.InputSchema được lưu trữ và tuần tự hóa cho từng thời kỳ của giao thức. So sánh các yêu cầu về schema legacy và hiện đại, rồi xác định API nhận biết phiên bản nào là phù hợp. Được xem là hoàn thành khi các client legacy nhận được schema tuân thủ mà không làm thay đổi dữ liệu công cụ dùng chung, trong khi các client hiện đại vẫn giữ schema chuẩn và các yêu cầu đồng thời vẫn an toàn.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Summary
The Go SDK supports both legacy MCP (2025-11-25 and earlier) and modern MCP (2026-07-28), but a server registers one static Tool.InputSchema and appears to return that same schema from tools/list regardless of the negotiated/requested protocol version.
That can make a dual-era server emit a schema that is valid under 2026-07-28 but outside the 2025-11-25 Tool.inputSchema envelope.
Specification boundary
In 2025-11-25, Tool.inputSchema permits only:
{
$schema?: string;
type: "object";
properties?: { [key: string]: object };
required?: string[];
}
SEP-2106, shipped in 2026-07-28, changes this to:
{ $schema?: string; type: "object"; [key: string]: unknown }
This explicitly permits root composition keywords such as anyOf, oneOf, and allOf for modern clients.
Reproduction shape
- Create a Go SDK server using the normal dual-era/default protocol support.
- Register a tool whose root input schema contains
type: "object"plusanyOf. - Connect a client using protocol version
2025-11-25. - Call
tools/list. - Observe that the modern schema is returned unchanged even though root
anyOfwas not representable by the legacyTool.inputSchemadefinition.
A concrete downstream incident is documented in github/github-mcp-server#3126. That incident also involved a model-provider restriction, but this issue is specifically about MCP protocol-era conformance.
Expected SDK behavior / API
The SDK should provide a deliberate way for dual-era servers to remain schema-conformant. Possible approaches:
- Validate tool schemas against every enabled protocol version at registration/startup and reject modern-only schemas unless the server supplies a legacy representation.
- Provide a version-aware tool/schema callback or
tools/listprojection hook so applications can supply a legacy-compatible representation. - Document that dual-era servers must keep canonical tool schemas within the legacy intersection unless they opt into version-specific representations.
I do not think the SDK should silently strip modern keywords, because removing constraints can change tool semantics.
Immutability and concurrency
Any version-specific representation should:
- deep-clone or use copy-on-write per inventory/list response;
- never mutate shared
Tool,InputSchema,Properties, or nested schema maps in place; - remain safe when legacy and modern requests are served concurrently;
- preserve the canonical modern schema for modern clients and caches.
Provider compatibility is separate
This issue should not attempt to solve Anthropic/OpenAI tool-schema subsets. A client using modern MCP may still need a provider-specific schema adapter before forwarding tools to an LLM API. That is independent of the MCP protocol version selected between client and server.
Existing issues checked
- #990 implemented SEP-2106 for the modern protocol.
- #455 addressed decoding incompatible schemas from older JSON Schema drafts.
I did not find an issue covering version-specific tools/list schema representations for a dual-era server.
- Ngôn ngữ chính
- Go
- Star
- 5.4k
- Fork
- 623
- Merge trung bình
- 22 giờ 10 phút
- Pull request đã merge (30 ngày)
- 30
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 82/100
modelcontextprotocol/go-sdk#1557 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Streamable HTTP (2026-07-28): tools/call with an out-of-range number in arguments fails because extractName decodes Arguments into anyCó thể làm lại được @beiryu đã nhận 10 ngày trước và không có pull request nào đang mở. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
modelcontextprotocol/go-sdk#1534 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Expose generic `SendNotification` on `ServerSession` for custom protocol extensionsCó thể làm lại được Pull request cho issue này đã bị đóng mà không được merge. Đ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
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 18/100
modelcontextprotocol/go-sdk#1555 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
mcp: 2026-07-28 client runs elicitation and sampling handlers for standalone server requestsCó thể làm lại được Pull request cho issue này đã bị đóng mà không được merge. Đang mở
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 35/100
modelcontextprotocol/go-sdk#1552 ·
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ó 1/5 1-3 giờ Mức phù hợp với người mới 88/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
compiler-explorer/compiler-explorer#9738 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
Độ 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ó 1/5 Dưới một giờ Mức phù hợp với người mới 85/100
evilmartians/lefthook#1674 ·
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
Maintainer thường phản hồi trong vòng 1 ngày