Repository navigation
Conversation
ianegordon
added a commit
to ianegordon/swift-sdk
that referenced
this pull request
Sep 11, 2026
…urces/templates/list (upstream modelcontextprotocol#269, shoemoney) Manifest entry 6. Upstream refs/pull/269/head at 4a7d8ef, unmodified. The everything-server listed test://template/{id} under resources/list and registered no ListResourceTemplates handler, so the template was advertised at the wrong endpoint and reachable at neither. Confirmed on the wire before the merge: resources/templates/list answered -32601. Spec-correct per the 2025-11-25 schema this SDK targets — Resource.uri is format: uri, ResourceTemplate.uriTemplate is format: uri-template (RFC 6570), and {id} is a template, not a URI. Note the PR's stated justification does not reproduce: resources-list passes on runner 0.1.15 (the version ci.yml pins) and 0.1.16, on every suite, because JSON Schema format is annotation-only by default. This fixes a latent spec violation, not a failing test. Conformance harness only; no MCP library change, so no downstream impact either way. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Eb9yGSXH1TVkg5Afsu9phk
ianegordon
added a commit
to ianegordon/swift-sdk
that referenced
this pull request
Sep 11, 2026
…mple to 0.12.2-ianegordon.6
The everything-server listed test://template/{id} under resources/list and
registered no ListResourceTemplates handler, so the template was advertised
at the wrong endpoint and reachable at neither — resources/templates/list
answered -32601. Confirmed on the wire before and after the merge.
Spec-correct per the 2025-11-25 schema: Resource.uri is format: uri,
ResourceTemplate.uriTemplate is format: uri-template (RFC 6570).
The entry records that the PR's stated justification does not reproduce —
resources-list passes on runner 0.1.15 and 0.1.16 on every suite, because
JSON Schema format is annotation-only by default — so this fixes a latent
spec violation rather than a failing test. Conformance harness only; the
MCP library is untouched.
Remaining candidates renumbered 7-8 to 6-7.
Tracking: fork issue #10.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Eb9yGSXH1TVkg5Afsu9phk
Contributor
|
Hi @shoemoney, thanks for this PR! I've reviewed it and it looks good to merge. Could you please rebase it onto the latest If you're no longer able to work on this, no problem: just let us know. If we don't hear back in about two weeks, we may carry the change forward in a new PR, with credit to you. |
Author
|
Yes of course I will jump get on it :)
…Sent from my iPhone
On Thu, Oct 22, 2026 at 10:15 AM Varun ***@***.***> wrote:
*varun06* left a comment (modelcontextprotocol/swift-sdk#269)
<#269 (comment)>
Hi @shoemoney <https://github.com/shoemoney>, thanks for this PR! I've
reviewed it and it looks good to merge.
Could you please rebase it onto the latest main? CI was broken on macOS
runners for every PR (a toolchain/SDK mismatch, fixed in #306
<#306>), so
rebasing will pick up the fix and give us a green run. I'll review and
merge once it's updated.
If you're no longer able to work on this, no problem: just let us know. If
we don't hear back in about two weeks, we may carry the change forward in a
new PR, with credit to you.
—
Reply to this email directly, view it on GitHub
<#269?email_source=notifications&email_token=AADMPBV4WKNWBUIYKP6UNRT5VIQCLA5CNFSNUABFM5UWIORPF5TWS5BNNB2WEL2JONZXKZKDN5WW2ZLOOQXTMMZUGQZDKMJXHA3KM4TFMFZW63VHNVSW45DJN5XKKZLWMVXHJLDGN5XXIZLSL5RWY2LDNM#issuecomment-6344251786>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AADMPBVQ5UVPCRMOZQT4YYL5VIQCLAVCNFSNUABFKJSXA33TNF2G64TZHM4TENZZGY3TQOJTHNEXG43VMU5TKMBTGQ3TIMRZGQ22C5QC>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
The everything-server listed "test://template/{id}" in its resources/list
response. Two problems:
- resources/list is specified to return direct resources; templates belong in
resources/templates/list.
- "{id}" is not a valid URI, so the response failed the spec's JSON schema
check on ListResourcesResult/resources/N/uri (format: "uri").
There was no ListResourceTemplates handler registered at all, so the template
was never reachable at its correct endpoint either.
Moves the template to a resources/templates/list handler. The ReadResource
handler already understood the test://template/ prefix, so template reads are
unaffected.
Verified against the official conformance runner on macOS 26 / arm64,
Swift 6.2.4:
before 67 passed, 2 failed (resources-list, elicitation-sep1330-enums)
after 68 passed, 1 failed (elicitation-sep1330-enums)
cursor
Bot
force-pushed
the
fix/resources-list-template
branch
from
October 23, 2026 01:28
4a7d8ef to
3e8acbe
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The everything-server listed
test://template/{id}in itsresources/listresponse. Two problems:resources/listis specified to return direct resources; templates belong inresources/templates/list.{id}is not a valid URI, so the response fails the spec's JSON-schema check onListResourcesResult/resources/3/uri(format: "uri").There was no
ListResourceTemplateshandler registered at all, so the template was never reachable at its correct endpoint either. This moves it to aresources/templates/listhandler. TheReadResourcehandler already understood thetest://template/prefix, so template reads are unaffected.Verified against the official conformance runner on macOS 26 / arm64, Swift 6.2.4:
Found while adding a
swift-sdkentry to the conformance matrix: modelcontextprotocol/conformance#432.AI assistance disclosure
Per the modelcontextprotocol AI policy: this change was made in conjunction with my pair programmer, Claude Code.
Extent, so you know how much scrutiny to apply: the defect was surfaced by an automated sweep I run across MCP-ecosystem repos, and the patch was written with Claude Code working alongside me. I reviewed it before filing — the before/after test output, the baseline test counts, and the lint/format runs quoted above were executed on my machine, not pasted from a model. I understand what the change does and why, and replies on this PR are mine.