Skip to content

Instead of returning the image data in a big base64, return a URL of the image file? #1638

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
lazyfai opened this issue May 1, 2025 · 2 comments
Labels
enhancement New feature or request server-puppeteer Reference implementation for the Puppeteer MCP server - src/puppeteer

Comments

@lazyfai
Copy link

lazyfai commented May 1, 2025

Besides working with Claude desktop, more and more people use MCP with LLM frontend like OpenWebUI.
For example if I asked LLM in OpenWebUI to go to certain website and fill in something , submit and get me back with a screenshot.
The result of the screenshot will be directly returned to LLM like a 1MB JSON data which not good for LLM to handle and show.
Instead of returning this, is it possible to save the image somewhere and return an image URL, which is supported by frontend using markdown to directly showing the image?

@lazyfai lazyfai added the enhancement New feature or request label May 1, 2025
@lazyfai
Copy link
Author

lazyfai commented May 1, 2025

Forgot to mention I meant puppeteer MCP server.

@olaservo olaservo added the server-puppeteer Reference implementation for the Puppeteer MCP server - src/puppeteer label May 3, 2025
@olaservo
Copy link
Member

olaservo commented May 4, 2025

I think the pattern you're describing follows how EmbeddedResources are meant to be used in Tool results. In other words, the result could include a reference to the image data as a Resource URI instead of the entire blob of data.

Or if you just want to return Markdown content with a link to a http resource URL, you could technically do that too. But then you would need a way to serve that image using http instead, since right now the screenshot is just being cached in memory by the Puppeteer server.

I think the EmbeddedResource option is closer to how MCP should be used here but might not be supported by OWUI.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request server-puppeteer Reference implementation for the Puppeteer MCP server - src/puppeteer
Projects
None yet
Development

No branches or pull requests

2 participants