Skip to content

Playwright screenshot tool fills context window #104

@Burry

Description

@Burry

The Playwright screenshot tool seems to fill the model's context window with base64-encoded image data. Could this data be omitted from the tool response, with the model directed to just read the screenshot image file?

⏺ next-devtools - browser_eval (MCP)(action: "screenshot")
  ⎿  ⚠ Large MCP response (~25.1k tokens), this can fill up context quickly         
  ⎿ {"success":true,"action":"screenshot","result":{"content":[{"type":"text","text"
    :"### Result\nTook the viewport screenshot and saved it as
    /var/folders/zn/3jf0y5g95pj4fhft836hf5p80000gp/T/playwright-mcp-output/176531185
    4814/page-2025-12-09T20-25-00-990Z.png\n\n### Ran Playwright code\n// Screenshot
     viewport and save it as /var/folders/zn/3jf0y5g95pj4fhft836hf5p80000gp/T/playwr
    ight-mcp-output/1765311854814/page-2025-12-09T20-25-00-990Z.png\nawait
    page.screenshot({\nscale: 'css',\n  type:
    'png'\n});\n"},{"type":"image","data":"iVBORw0KGgoAAAANSUhEUgAABCgAAARtCAYAAACX/
    [...]

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions