Skip to content

Browser screenshot fails MCP content validation after 2026.6.1 upgrade #90743

Closed

Description

@k-schmidt

Bug

browser action=screenshot returns a union validation error on content[1] (the image block).

Repro

browser action=screenshot profile=openclaw

Returns:

Invalid input: expected string, received undefined — path: content[1].data
Invalid input: expected string, received undefined — path: content[1].mimeType

Root Cause

imageResult() in common-CQZwSsYR.js (lines ~238-246) builds the image content block as:

{ type: "image", data: base64, mimeType: "image/png" }

But the MCP SDK now expects the newer format:

{ type: "image", source: { type: "base64", media_type: "image/png", data: base64 } }

The isImageBlock() validator in tool-images-BO1Itut2.js also uses the old shape.

Workaround

browser action=pdf works (returns a file reference instead of inline base64).

Environment

  • OpenClaw: 2026.6.1
  • macOS Darwin 25.4.0 (arm64)
  • Node: v25.9.0
  • Browser: Chrome via CDP

Activity

  1. clawsweeper commented on Jun 5, 2026

    @clawsweeper
    Contributor

    Codex review: keeping this open for maintainer follow-up; there is still a little grit to resolve. Reviewed June 21, 2026, 2:26 PM ET / 18:26 UTC.

    Summary
    Keep open. Current main and the latest release still leave the MCP plugin-tools result boundary without source-shaped image normalization, and the open closing-reference PR is the active fix candidate.

    Reproducibility: yes. for the MCP boundary when a plugin tool returns source-shaped image content: current main passes array content through and the pinned SDK 1.29.0 schema expects top-level data/mimeType. No for the exact live browser command, because this read-only review did not run Chrome/CDP and current screenshot source emits top-level image blocks.

    Root-cause cluster
    Relationship: canonical
    Canonical: #90743
    Summary: This issue is the canonical narrow report for browser screenshot MCP content validation; the open PR is the active candidate fix and broader MCP binary relay work remains adjacent.

    Members:

    Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything.

    Next step
    No new repair lane should be queued while the open closing-reference PR remains the active implementation candidate.

    Review details

    Best possible solution:

    Review and land or reject #90902, then close this issue only after the chosen fix is merged and verified against the pinned SDK result contract.

    Do we have a high-confidence way to reproduce the issue?

    Yes for the MCP boundary when a plugin tool returns source-shaped image content: current main passes array content through and the pinned SDK 1.29.0 schema expects top-level data/mimeType. No for the exact live browser command, because this read-only review did not run Chrome/CDP and current screenshot source emits top-level image blocks.

    Is this the best way to solve the issue?

    Yes, the active linked PR targets the plugin-tools MCP serialization boundary rather than screenshot capture or user configuration. The final shape should follow the pinned SDK contract unless maintainers choose a broader MCP SDK migration.

    AGENTS.md: found and applied where relevant.

    Remaining risk / open question:

    • The full live Chrome/CDP browser action=screenshot profile=openclaw path was not replayed, and current source emits top-level data/mimeType for that screenshot helper.
    • The issue body's proposed source-shaped MCP image format conflicts with the repository's pinned SDK 1.29.0 result schema, so the open PR needs maintainer acceptance of the pinned dependency contract.

    Codex review notes: model internal, reasoning high; reviewed against bda05dbc2f15.

    Label changes

    Label justifications:

    • P2: This is a normal-priority MCP screenshot/content validation bug with a bounded plugin-tools bridge blast radius and an open focused fix PR.
    • impact:other: The issue affects MCP tool-result interoperability for image content, which is maintainer-visible but outside the narrower owned impact categories.
    Evidence reviewed

    What I checked:

    Likely related people:

    • joshavant: Current blame shows the MCP plugin-tools handler and image-result helper were carried into current main by the recent mobile exec approvals work. (role: recent area contributor; confidence: high; commits: 5d1e649aeadf; files: src/mcp/plugin-tools-handlers.ts, src/mcp/plugin-tools-serve.test.ts, src/mcp/tools-stdio-server.ts)
    • vincentkoc: The latest release commit includes the same MCP plugin-tools handler shape used to assess shipped behavior. (role: recent release-path contributor; confidence: medium; commits: c645ec4555c0; files: src/mcp/plugin-tools-handlers.ts, src/mcp/plugin-tools-serve.test.ts, src/mcp/tools-stdio-server.ts)
    • steipete: Earlier history shows plugin-tools MCP handler isolation and bridge hardening tests adjacent to this result boundary. (role: MCP bridge test history contributor; confidence: medium; commits: e75cd46ba658, 73477eee4c41; files: src/mcp/plugin-tools-handlers.ts, src/mcp/plugin-tools-serve.test.ts)
    • scotthuang: Recent browser screenshot vision/media work touches the screenshot-producing side that feeds the MCP result path. (role: adjacent browser screenshot contributor; confidence: medium; commits: 7920af0c9ec4; files: extensions/browser/src/browser-tool.ts)
    How this review workflow works
    • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
    • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
    • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
    • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
    • Maintainers can also comment @clawsweeper review to request a fresh review only.
    • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
    • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
    • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.
  2. added
    P2Normal backlog priority with limited blast radius.
    impact:otherThis issue has meaningful maintainer-visible impact outside the owned taxonomy.
    issue-rating: 🦞 diamond lobsterVery strong issue quality with high-confidence source-level or clear reproduction.
    clawsweeper:source-reproClawSweeper found a high-confidence source-level issue reproduction.
    clawsweeper:linked-pr-openClawSweeper found an open linked pull request for this issue.
    clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.
    issue-rating: 🐚 platinum hermitGood issue quality with a plausible reproduction path needing some confirmation.
    clawsweeper:needs-live-reproClawSweeper needs live local, crabbox, or manual validation to confirm this issue.
    and removed
    clawsweeper:source-reproClawSweeper found a high-confidence source-level issue reproduction.
    issue-rating: 🦞 diamond lobsterVery strong issue quality with high-confidence source-level or clear reproduction.
    on Jun 15, 2026
  3. steipete commented on Jun 26, 2026

    @steipete
    Contributor

    Fixed on main by #90902 in a846b879ecd9.

    Verification covered the pinned MCP SDK image schema plus a real in-memory MCP client/server round trip (9 focused tests), followed by green exact-head hosted CI.

  4. locked as resolved and limited conversation to collaborators on Jul 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Normal backlog priority with limited blast radius.clawsweeper:linked-pr-openClawSweeper found an open linked pull request for this issue.clawsweeper:needs-live-reproClawSweeper needs live local, crabbox, or manual validation to confirm this issue.clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.impact:otherThis issue has meaningful maintainer-visible impact outside the owned taxonomy.issue-rating: 🐚 platinum hermitGood issue quality with a plausible reproduction path needing some confirmation.

    Type

    No type

    Fields

    Priority

    None yet

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions