ui: prefer structuredContent preview for multi-block tool results#703
Open
iqdoctor wants to merge 4 commits intoevalstate:mainfrom
Open
ui: prefer structuredContent preview for multi-block tool results#703iqdoctor wants to merge 4 commits intoevalstate:mainfrom
iqdoctor wants to merge 4 commits intoevalstate:mainfrom
Conversation
Owner
|
Hi @iqdoctor -- picking up from our chat; fast-agent was using the text content block. I've updated the handling with what I think is most appropriate; and run the prompt for the plan. let me know what you think.
|
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.

Why
MCP tools can return both
structuredContentandcontent.Per MCP spec,
structuredContentis the structured machine payload, whilecontentmay include a serialized JSON mirror for backward compatibility.Today fast-agent console rendering prefers the multi-block
content[]path even whenstructuredContentis present. For tools likecrm_tickets, that produces noisyN Text Blocksoutput instead of one compact structured preview.Change
structuredContentcontentis just multipleTextContentblocksstructuredContentNo MCP contract change. This is display-only.
Why this matches the standard
MCP Tools spec says servers may return structured data in
structuredContent, and for backward compatibility they should also serialize it intocontent.So for clients,
structuredContentis the canonical structured payload;contentis the compatibility mirror.Refs:
Validation
uv run scripts/lint.pyuv run scripts/typecheck.py