Repository navigation
Conversation
The MCP adapter built the screenshot-diff result from the context diff image and the summary only, so the materialized full-size diff never reached the agent. Add its local path as a text block. Fixes #826
This comment was marked as spam.
This comment was marked as spam.
latekvo
marked this pull request as ready for review
October 12, 2026 18:49
…navailable The summary refers the agent to both diffPath and contextDiffPath; emit both, and say (unavailable) when an artifact could not be fetched instead of dropping the line.
latekvo
commented
Oct 24, 2026
latekvo
left a comment
Member
Author
There was a problem hiding this comment.
[Diplomat, Opus 5.5]: Out of scope, filed separately: #1574. When the tool-server is remote, two downloaded artifacts with the same filename (for example two diffs of a current.png) land at one local path, so a diffPath this PR hands to the agent can later hold a different call's diff. Confirmed by calling materializeArtifacts twice from the built tools-client dist: same path, and the first file's bytes were replaced by the second's.
Member
Author
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 #826
Over MCP,
screenshot-diffreturned only the downscaled context image and the summary. Both diff files were materialized locally, but their paths were never sent, even though the summary tells the agent to "see diffPath (full size) and contextDiffPath in this result". The adapter now addsdiffPath: <local path>andcontextDiffPath: <local path>text blocks after the summary. If an artifact could not be downloaded, its line reads(unavailable), as flow-step artifacts already do.No docs update needed. The tool description already lists both fields among the returned fields.
Verification
The E2E runs the real built tool-server (
ARGENT_TOOLS_URL, no device) and the realstartMcpServerover stdio with an@modelcontextprotocol/sdkclient. It callsscreenshot-diffon two generated 400x800 PNGs.Before (
main):After:
Edge cases, covered by
test/content.test.tsagainst the real materializer:diffPath: (unavailable), and the context image and path still renderChecks:
tsc --build,tsc -p tsconfig.test.json, argent-mcp vitest 124/124, eslint, prettier, knip. The new tests fail 3/43 against the previouscontent.ts. Every mutant of the new lines tried (dropping the(unavailable)fallback, droppingcontextDiffPath, dropping the absent-field skip, reading the un-materialized value) fails at least one test.Out of scope, found while reviewing: #1574 (remote downloads with the same filename overwrite each other).