Skip to content

fix: reject JSON arrays as 3p and WebMCP tool params - #2785

Merged
wolfib merged 3 commits into
ChromeDevTools:mainfrom
kevin9327:fix/reject-json-array-tool-params
Sep 28, 2026
Merged

wolfib merged 3 commits into
ChromeDevTools:mainfrom
kevin9327:fix/reject-json-array-tool-params

Conversation

@kevin9327

Copy link
Copy Markdown
Contributor

Summary

execute_3p_developer_tool and execute_webmcp_tool parse a JSON string as params. Arrays pass typeof parsed === 'object' && parsed !== null, so [] skipped the object check and failed later with a misleading error (Tool not found or a Puppeteer private-field TypeError).

Reject arrays the same way wsHeaders already does.

Testing

  • npm run test tests/tools/thirdPartyDeveloper.test.ts tests/tools/webmcp.test.ts
  • npm run typecheck
  • npm run check-format

AI-assisted (Grok)

@google-cla

google-cla Bot commented Sep 20, 2026

Copy link
Copy Markdown

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

@OrKoN
OrKoN requested a review from wolfib September 22, 2026 14:09

@wolfib wolfib left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The change looks good to me, thanks!
Please sign the CLA and we can get this merged.

@kevin9327

Copy link
Copy Markdown
Contributor Author

I have signed the Google Individual CLA now (GitHub username kevin9327). The cla/google check on this PR and on #2781, #2782, #2783 and #2784 still shows the result from before I signed, and I can't re-run it from my side. Could you re-run it when you get a chance? Thanks.

@wolfib wolfib left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! LGTM

@wolfib
wolfib added this pull request to the merge queue Sep 28, 2026
Merged via the queue into ChromeDevTools:main with commit c14e616 Sep 28, 2026
28 of 30 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants