Skip to content

fix(mcp): allow text-only preview snapshots - #234

Merged
leoisadev1 merged 2 commits into
mainfrom
fix/preview-text-only-snapshot
Sep 10, 2026
Merged

leoisadev1 merged 2 commits into
mainfrom
fix/preview-text-only-snapshot

Conversation

@leoisadev1

Copy link
Copy Markdown
Member

Problem

Repeated preview_snapshot calls add a PNG to each MCP result. Providers or gateways with image-count limits may reject the accumulated conversation.

Fix

Add optional includeImage. {"includeImage":false} returns fresh page metadata and JSON text without an image content part. Omitted or true preserves the existing PNG response. The flag stays inside the MCP server. Browser capture is unchanged.

Adaptation

Reviewed port of pingdotgg#10232.

Verification

  • vp test run apps/server/src/mcp/McpHttpServer.test.ts: 5 passed, including a text-only snapshot after a default PNG snapshot.

Implemented with Grok 4.6 High in Grok Build via Orca.

Repeated preview_snapshot calls add a PNG to each MCP result. Providers
with image-count limits may reject the conversation. Optional
includeImage=false returns the same page metadata without an image part.

Adapted from pingdotgg#10232.

Implemented with Grok 4.6 High in Grok Build via Orca.
@vercel

vercel Bot commented Sep 10, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated
akeru-bot-landing Skipped Skipped Sep 10, 2026 6:07pm UTC

Request Review

@github-actions github-actions Bot added vouch:trusted PR author is trusted by repo permissions or the VOUCHED list. size:S labels Sep 10, 2026
@greptile-apps

greptile-apps Bot commented Sep 10, 2026 •

Copy link
Copy Markdown

Greptile Summary

This PR adds an optional MCP-only includeImage parameter to preview_snapshot. Passing false captures a fresh browser snapshot and returns structured metadata without the PNG block; omitting the parameter or passing true preserves the existing image response.

Confidence Score: 5/5

No outstanding issues require changes before merging.

No new issues or outstanding previous-thread issues are present.

Reviews (2): Last reviewed commit: "Merge branch 'main' into fix/preview-tex..." | Re-trigger Greptile

@leoisadev1
leoisadev1 merged commit 659833a into main Sep 10, 2026
11 checks passed
@leoisadev1
leoisadev1 deleted the fix/preview-text-only-snapshot branch September 10, 2026 21:52
This was referenced Sep 10, 2026

This branch was successfully deployed

1 active deployment
Preview — c1218e38 Deployed Sep 10, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:S vouch:trusted PR author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant