The `maxToolInputElements` refusal lacks the `Input validation error:` prefix that the schema refusal carries
Maintainer thường phản hồi trong vòng 1 ngày
Đánh giá
- Độ khó
- 2/5
- Thời gian dự kiến
- 1-3 giờ
- Mức phù hợp với người mới
- 78/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- typescript
- Lĩnh vực
- backend-api-design
Hướng nghiên cứu
Bắt đầu tại packages/server/src/server/mcp.ts và đọc McpServer.validateToolInput, so sánh thông báo từ chối do giới hạn kích thước với thông báo từ chối do xác thực schema được mô tả trong issue. Cập nhật câu chữ từ chối do kích thước để có tiền tố dùng chung, sau đó kiểm tra các bài test server liên quan đến cả hai thông báo từ chối. Hoàn tất khi thông báo từ chối do kích thước bắt đầu bằng Input validation error: và vẫn giữ các chi tiết hiện có.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Version: @modelcontextprotocol/sdk 1.32.2 (the same text is in packages/server/src/server/mcp.ts on main).
McpServer.validateToolInput refuses a tool call in two ways. Both are McpError(ErrorCode.InvalidParams, …), and the tools/call handler returns either one as an isError: true result:
- arguments over
maxToolInputElements:
Invalid arguments for tool start_run: arguments contain more than the maximum of 50000 elements - arguments that fail the input schema:
Input validation error: Invalid arguments for tool get_run_state: Invalid input: expected string, received number at run_id
A client or a log filter that recognises an input refusal by its Input validation error: prefix misses the first one. Yet both are the same kind of refusal: bad arguments, same error code.
Suggestion: give the size refusal the same prefix:
Input validation error: Invalid arguments for tool start_run: arguments contain more than the maximum of 50000 elements
Context: we set maxToolInputElements: 50_000 in Realm's MCP server (thank you for #2926/#2927), and we document both texts for our users.
Related: #2879 asks for a hook to shape the schema refusal's result; if it lands, the size refusal could go through the same hook.
- Ngôn ngữ chính
- TypeScript
- Star
- 13.7k
- Fork
- 2.3k
- Merge trung bình
- 1 ngày 6 giờ
- Pull request đã merge (30 ngày)
- 53
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Không 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/typescript-sdk
-
server: registeredResource.update and registeredResourceTemplate.update desync title and metadata.title when updating metadata aloneCó thể đã có người làm Có pull request liên kết đang mở hoặc đã được merge. Đang mởv1 v2
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
modelcontextprotocol/typescript-sdk#3103 · 5 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
[v1.x] Protocol.request keeps its abort listener after the request resolved, so a later abort sends notifications/cancelled for an answered request (1.30.0)Có thể đã có người làm Có pull request liên kết đang mở hoặc đã được merge. Đang mởv1
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
modelcontextprotocol/typescript-sdk#3090 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
[v2] e2e `protocol:timeout:max-total` is flaky over SSE: fake timers advance before the request reaches the serverCó thể đã có người làm @Singmin đã nhận 11 ngày trước. Đang mởv1 v2
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
modelcontextprotocol/typescript-sdk#3045 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
[v1.x] Backport #2654: `notifications/cancelled` with `requestId: 0` is ignored, so the first server→client request cannot be cancelled (still in 1.32.1)Có thể đã có người làm @CloudCorpRecords đã nhận 11 ngày trước. Đang mởv1
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 77/100
modelcontextprotocol/typescript-sdk#3043 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
v1 v2
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
modelcontextprotocol/typescript-sdk#2946 · 4 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của modelcontextprotocol/typescript-sdk
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
marmelab/react-admin#11431 ·
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 88/100
db-ux-design-system/core-web#8655 ·
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 74/100
Maintainer thường phản hồi trong vòng 1 ngày
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
stripe/react-stripe-js#728 ·
-
[Upload Grade C dataset] the pop-up changes it's size while uploading the document => Jumping effectĐang mởbug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 66/100
epam/statgpt-admin-frontend#305 ·
Maintainer thường phản hồi trong vòng 1 ngày