Fix tools-name-format for spec Tool Names SHOULD rules on 2025-11-25+#380
Fix tools-name-format for spec Tool Names SHOULD rules on 2025-11-25+#380canardleteer wants to merge 4 commits into
Conversation
There was a problem hiding this comment.
Thanks for the thorough fix and the detailed test plan! I verified the substance against the spec source: the validation rules (1–128 chars, ^[A-Za-z0-9_.-]+$), WARNING severity for the SHOULD-level rules, and the version gating to 2025-11-25+ all match the dated spec prose, and all 336 tests pass locally.
One blocking item: npm run check (typecheck via tsgo --noEmit) fails with a TS2322 in tools.test.ts — one-click suggestion attached inline, verified locally (typecheck clean, tests still pass). The other two comments are optional nits — take or leave.
commit: |
0fd7828 to
2d083ab
Compare
Enforce dated spec Tool Names SHOULD rules (128 max, no slash), WARNING severity, 2025-11-25+ gate, negative fixture, and core-spec specReferences. Fixes modelcontextprotocol#379
Document SEP-986 markdown vs integrated spec divergence in fixture header.
2d083ab to
f1e4395
Compare
@claude - Accepted all 3 changes and pushed after another local test run. |
Closes #379. Completes the gaps left by #238 / #240.
Summary
tools-name-formatontools-listto enforce 2025-11-25 / draft spec prose (1–128 chars,[A-Za-z0-9_.-]only), not stale SEP-986 markdown (64 chars,/allowed).WARNING(notFAILURE) for SHOULD violations per AGENTS.md; gates the check to2025-11-25+viatoolNameFormatCheckApplies()so2025-03-26/2025-06-18runs do not false-fail.sep-986-invalid-tool-names.ts+ vitest;specReferenceslist core spec URLs first, then SEP/history links (#986, PR #1603) for divergence context only. Nosep-986.yaml— requirement is core spec, not SEP traceability.Test plan
npm run buildnpm test(336 tests, includingall-scenarios.test.ts/tools-list)npm test -- src/scenarios/server/tools.test.ts(validation rules, version gate, mocked scenario gate)npm test -- src/scenarios/server/negative.test.ts(tools-name-format→WARNINGagainstsep-986-invalid-tool-names.ts)node dist/index.js server --url http://127.0.0.1:<port>/mcp --scenario tools-list --spec-version 2025-11-25againsteverything-server→tools-list+tools-name-formatSUCCESS2025-11-25—node dist/index.js sdk typescript-sdk-v1 --mode server --scenario tools-list --spec-version 2025-11-25 --skip-build→tools-list+tools-name-formatboth SUCCESS, baseline check passedtools-name-formatnot emitted for--spec-version 2025-06-18— CLI against everything-server emits onlytools-list(1/1 checks); grep finds notools-name-formatAcceptance criteria (#379)
tools-name-formatusesWARNINGfor SHOULD violations on 2025-11-25 and draft/)sep-986.yaml(core spec enforcement; SEP links are context inspecReferencesonly)Notes for reviewers
tools.tsdocuments divergence from SEP markdown.traceability.jsonrefresh (workflow-driven).