Skip to content

Conversation

dovstern
Copy link

Add support for converting MCP types (images, pdfs. etc) to langchain tool artifacts

Currently langchain can't handle MCP tools that return ImageContent or PDF, cuz the artifact is sent back as the MCP type class, not the expected input of the LLM APIs.

This PR converts the tool output for non text content to the expected LLM format

… tool artifacts

Currently langchain can't handle MCP tools that return ImageContent or PDF, cuz the artifact is sent back as the MCP type class, not the expected input of the LLM APIs
@dovstern
Copy link
Author

@vbarda can I get a review? Would be awesome if langchain supported MCP tools that return ImageContent / PDFs!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant