fix: adjust ui/message content to be ContentBlock[]#166
Closed
Conversation
RomKadria
approved these changes
Dec 18, 2025
aharvard
added a commit
to block/goose
that referenced
this pull request
Jan 16, 2026
The MCP Apps draft spec (SEP-1865) has been in flux regarding the
ui/message params.content type. After discussion with the spec authors,
the agreed format is ContentBlock[] (array of content blocks) rather
than a single ContentBlock object.
This change:
- Updates McpMethodParams['ui/message'] to expect content as ContentBlock[]
- Adds ContentBlock type supporting text, image, and resource blocks
- Updates the handler to extract text from the first text block in the array
- Returns empty object {} on success per the spec
Related spec discussions:
- modelcontextprotocol/ext-apps#48
- modelcontextprotocol/ext-apps#119
- MCP-UI-Org/mcp-ui#166
Collaborator
|
fixed in #167 |
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.
This PR fixes the type of
ui/messagecontent from MCP Apps bridge to beContentBlock[](see discussion here )There are lint fixes here (since we moved to eslint@9).
The actual content block fixes are two lines in
adapter-runtime.js: https://github.com/MCP-UI-Org/mcp-ui/pull/166/changes#diff-dfbf3818886f740fd71a692dd96cf29550a2ff6c98b62670d7edf302f9bd608fL536-R578