Repository navigation
docs(spec): align examples with the normative text (ui/initialize, teardown, CSP default) - #822
Open
shreesh1802 wants to merge 1 commit into
Open
shreesh1802 wants to merge 1 commit into
shreesh1802 wants to merge 1 commit into
Conversation
…ardown, CSP default)
- Transport snippet: send "ui/initialize" with appInfo and appCapabilities, as the text
("MUST include its capabilities in the appCapabilities field") and McpUiInitializeRequest
in src/spec.types.ts specify, instead of "initialize" with capabilities and clientInfo.
- ui/resource-teardown: describe it as a request (it has an id and a response), not a
notification.
- CSP construction example: fall back to connect-src 'none' when no CSP is declared, matching
the "Restrictive Default" section, as the example already does for frame-src.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This branch has not been deployed
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.
While building an MCP App server (Python) I checked the draft spec's examples against its normative text and the SDK types in
src/spec.types.ts, and found three places that disagree. This PR changes documentation only (one file, 5 lines)."initialize"withcapabilitiesandclientInfo. The text ("MUST include its capabilities in theappCapabilitiesfield") andMcpUiInitializeRequestspecify"ui/initialize"withappInfo,appCapabilitiesandprotocolVersion. Following the snippet leaves out the requiredappInfo; I did exactly that in my first implementation.ui/resource-teardownis described as "Host notifies View", but the example has anidand a response, andMcpUiResourceTeardownRequestis a request type. Reworded as a request.connect-src 'self'when no CSP is declared, but the "Restrictive Default" section requiresconnect-src 'none'. The example now falls back to'none', as it already does forframe-src.Two notes for reviewers:
specification/2026-01-26/apps.mdx(the stable spec). I left that file alone and can port the changes if you want.params: { reason: string }, becauseMcpUiResourceTeardownRequesthasparams: {}. Which one is intended?Found while building https://github.com/shreesh1802/Sahayak for the Amazon Developer Hackathon. I prepared this change with the help of Claude Code and checked each point against the spec file and
src/spec.types.ts.