Repository navigation
feat: return screenshot and sample_frames output as inline images (#79) - #130
Merged
Merged
Conversation
screenshot and sample_frames now append MCP image blocks after the JSON result, so clients show frames to the model directly. Inline images are downscaled JPEGs (maxImageWidth, default 1280); sample_frames embeds at most maxInlineImages (default 8, max 20) and reports how many it left out. Full-resolution PNGs are still written and listed by path, and returnImage(s): false restores paths-only results. Co-Authored-By: Claude Opus 5.5 <[email protected]>
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.
Closes #79.
What
screenshotandsample_framesnow append MCPimageblocks after the JSON text block, so clients (Claude Code, Claude Desktop, Cursor) show the frames to the model directly. No filesystem or image tool is needed to watch a recording.src/utils/images.ts:buildPreviewArgs(pure, downscale-onlyscale='min(W,iw)':-2to JPEG),clampInlineCount, andencodeInlineImages.ToolResultinerrors.tsnow allows image content;okResponse(value, images?)appends the blocks after the text.screenshot:returnImage(default true),maxImageWidth(default 1280).sample_frames:returnImages(default true),maxInlineImages(default 8, max 20),maxImageWidth. When frames are left out, aninlineNotesays so; every frame is still on disk and listed by path.inlineImages.Tests
images.test.tscovers the builder, the clamp, andokResponseordering.RUN_LOCAL_CAPTURE_TESTS=1, run locally on Windows): all 9 pass. The test helper now reads only text blocks, and new checks assert inline images fromscreenshotandsample_framesplus thereturnImages: falseopt-out.Docs: README watch loop, tools tables (README and Pages site),
mcp-tools.json, ROADMAP, CHANGELOG. Version 0.11.0.🤖 Generated with Claude Code