Repository navigation
fix: preserve MCP file artifacts in programmatic tool calls - #645
Draft
JamieStivala wants to merge 1 commit into
Draft
JamieStivala wants to merge 1 commit into
JamieStivala wants to merge 1 commit into
Conversation
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.
Problem and change
An MCP download can return a text summary and owned interpreter references, but nested
executeToolscalls currently retain only text. This preserves the download's success summary while discarding the file inputs needed by the PTC script.This change forwards invocation context and cancellation, retains normalized references separately from text, sends references with capability-advertised continuations, and retains host-only attachment metadata on the outer artifact. Ordinary tool input/text behavior stays compatible. Binary content and host attachment metadata are not sent in continuation results.
Fixes #644. Related host report: LibreChat-AI/LibreChat#17092. Coordinated backend change: LibreChat-AI/code-interpreter#371. Backends without that capability return an explicit same-script delivery limitation.
Verification
References: LangChain tool artifacts, MCP embedded tool resources.
This is my first contribution to this repository, so any feedback is appreciated :) AI assistance was used; reproduction and verification limits are documented above.