-
Notifications
You must be signed in to change notification settings - Fork 9.1k
Add a Puppeteer tool to capture screenshot as raw base64 text #1201
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
Conversation
This comment was marked as resolved.
This comment was marked as resolved.
|
Hi @yomandawg sorry for missing your tagging me here. I added a comment and will keep an eye out for updates on this one. Thanks! |
|
Looks good, just wanted to double check that this will do what you originally intended since in the original PR you said:
Technically if encoded is |
|
Yes, the updated PR message accurately reflects the commit. And you're also right-- although image data will be included in both cases, correctly identifying it as either |
|
(Fyi, this will go to an package publishing approval workflow and get tagged and pushed to NPM as a new version once that gets approved by someone on the core team.) |
Add optional parameter to Puppeteer tool to capture screenshot as base64 TextContent
Description
Added an optional param(
encoded) topuppeteer_screenshottool to capture screenshots and return the result as a raw base64-encoded string (without a MIME type).Server Details
puppeteer_screenshot)Motivation and Context
The existing
puppeteer_screenshottool returns screenshots as amimeType: "image/png". However, some MCP clients are unable to properly parse or display image type content.This optional param solves that by returning only the raw base64 string of the screenshot, enabling better compatibility with clients that expect raw text output.
How Has This Been Tested?
Tested locally with an LLM client using:
Breaking Changes
No breaking changes. This is an additive feature.
Types of changes
Checklist
Additional context