everything: add focused annotation-presence registration tests
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ó
- 2/5
- Thời gian dự kiến
- 1-3 giờ
- Mức phù hợp với người mới
- 62/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ệ
- nodejs, typescript
- Lĩnh vực
- testing-qa
Hướng nghiên cứu
Bắt đầu từ __tests__/registrations.test.ts trong workspace của máy chủ everything, rồi đọc surface.test.ts để xem snapshot annotation hiện có. Thêm assertion kiểm tra rằng mọi đăng ký tool tiêu chuẩn, có điều kiện và tác vụ đều đặt readOnlyHint, destructiveHint, idempotentHint và openWorldHint là boolean, mà không thay đổi snapshot hay giá trị hint. Hoàn thành khi npm test --workspace @modelcontextprotocol/server-everything -- __tests__/registrations.test.ts chạy thành công và npm run validate vẫn xanh.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Which server?
everything (@modelcontextprotocol/server-everything)
Protocol era
Both, or not era-specific. The local verification below covers SDK 1 only; the request should be evaluated against the current v2/main registration paths.
MCP client
Automated Vitest tests. No external or LLM client was used for this test-only change.
The problem
Following the current issue-only contribution policy, I am converting the suggestion in #4529 into a registration-test coverage request, without attaching a patch.
The existing surface.test.ts already snapshots advertised annotations. The smaller gap is that the registration suite does not explicitly check the presence and boolean type of all four hints across every supported standard, capability-dependent, and task registration path. A focused assertion would give a more local failure when a refactor drops metadata at registration.
This is not a report that current tools lack annotations. Annotation presence also does not establish tool safety or prove that a hint accurately describes its behavior.
Solution you have in mind (optional)
Add registration-level regression checks for readOnlyHint, destructiveHint, idempotentHint, and openWorldHint, with the capabilities needed to exercise conditional/task paths enabled. Preserve the existing surface snapshots, capability tests, hint values, and validation gates. No runtime changes or provider-specific integration.
For current SDK 2 development, derive expectations from its modern/legacy registration paths rather than copying the SDK 1 counts below.
Which MCP feature does it demonstrate? (optional)
Existing MCP tool-annotation metadata and its registration paths.
Alternatives or workarounds you have tried
Relying on the existing wire-level snapshots alone remains a reasonable alternative if maintainers consider the additional registration check redundant.
I searched existing issues. #3401 concerns missing annotations in an older version, while #4854 tracks the completed broader coverage effort. This request does not repeat the older zero-annotations claim.
Already built it locally?
Yes, a test-only prototype against main at bbb701e7ac1e57f3edd1c2836b94c5457eaf7b9c (Everything 1.0.0, SDK 1). It preserves the ten existing registration test cases and adds two checks covering the 12 standard, six conditional, and one task registration in that snapshot. No production source changed. Those counts are not asserted for SDK 2.
Verified on 2026-10-15 with Node 22.18.0, npm 10.9.3 and Vitest 4.1.11:
npm test --workspace @modelcontextprotocol/server-everything -- __tests__/registrations.test.ts: 12 passed.npm run validate --workspace @modelcontextprotocol/server-everything: formatting, lint, type checking, build, and 260 tests passed.npm run coverage --workspace @modelcontextprotocol/server-everything: 260 tests passed and per-file coverage thresholds cleared.git diff --check: passed.
These are scoped test/build results, not a claim that the repository-wide submission gate passed. The old PR's original commit predates the current DCO workflow. I have not rewritten that history or pushed the local repair.
Original repair prompt (exact quotation except two redacted local paths)
These historical instructions explain the local reproduction; this issue follows the current contribution policy instead of requesting a PR merge.
You own ONLY the existing clone [LOCAL_SERVERS_CLONE] for repairing https://github.com/modelcontextprotocol/servers/pull/4529 (author jw-ond). User authorized beginning the upstream repair plan. Parent handles promptfoo, CrewAI, Langfuse. Do not edit [UNRELATED_LOCAL_PROJECT] or other clones. No new worktree. First inspect git status/branch/remotes, applicable AGENTS/CONTRIBUTING, and live PR head. If unexpected conflicting user changes exist, stop/report. Fetch current base and fork PR head, preserve all existing commits; prefer a merge from upstream main rather than history rewriting/force. Reproduce the conflict, resolve preserving intended tool-annotation registration regression coverage and current upstream behavior. Use apply_patch for manual edits, run appropriate focused tests/build plus git diff --check. This is restoring compatibility, no feature expansion and no test weakening. You may make a scoped normal commit on the verified PR feature branch; DO NOT PUSH or POST until parent reviews. Return old/new SHAs, exact changed file set, test commands/results, and any blockers. Work directly in that clone and preserve unrelated files. Do not disable hooks/security gates or use --no-verify.
Before you submit
- I searched existing issues and this is not a duplicate.
- This is a request for this repository or one of its servers, not a new server, the MCP specification or an SDK.
- Ngôn ngữ chính
- JavaScript
- Star
- 91.2k
- Fork
- 11.8k
- Merge trung bình
- 6 giờ 20 phút
- Pull request đã merge (30 ngày)
- 117
Chuẩn bị môi trường
- 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/servers
-
memory: create_entities, create_relations and add_observations could declare idempotentHint: trueĐang mởenhancement v2
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 78/100
modelcontextprotocol/servers#5153 · 2 bình luận ·
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 78/100
modelcontextprotocol/servers#5134 ·
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 75/100
modelcontextprotocol/servers#5071 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
git: git_create_branch is marked non-destructive but silently resets an existing packed branchĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 85/100
modelcontextprotocol/servers#5059 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
mcp-server-fetch: `fetch` prompt returns JSON-RPC error code 0 with the raw exception text for an invalid URLCó thể làm lại được Pull request cho issue này đã bị đóng mà không được merge. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
modelcontextprotocol/servers#4914 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của modelcontextprotocol/servers
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Add: EUROTV NEWSĐang mởchannels:add check:passed
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
-
curriculum documentation quality
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
githubnext/gh-aw-workshop#4638 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
clawsweeper:fix-shape-clear clawsweeper:queueable-fix clawsweeper:source-repro impact:ux-friction issue-rating: 🦞 diamond lobster no-stale P2
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
openclaw/openclaw-enterprise#2571 · 1 bình luận · 1 reaction ·
Maintainer thường phản hồi trong vòng 1 ngày