Skip to content

feat(webmcp): expose consequential and debugging tool annotations - #3250

Open
vishalanton16 wants to merge 6 commits into
browserbase:mainfrom
vishalanton16:vishal/webmcp-consequential
Open

vishalanton16 wants to merge 6 commits into
browserbase:mainfrom
vishalanton16:vishal/webmcp-consequential

Conversation

@vishalanton16

@vishalanton16 vishalanton16 commented Oct 19, 2026 •

Copy link
Copy Markdown

Why

Applications need WebMCP annotations to identify consequential actions and tools intended for developers.

What

Preserves optional consequential and debugging annotations in the TypeScript and Python SDKs, including explicit false values and omitted fields. Documents approval handling and debugging metadata.

How

Updates the Chrome DevTools Protocol dependency, annotation mapping, schema, and generated models. Merges current main and drops Go SDK changes and its changeset entry because Go is maintained on v4-go.

Validation: 236 targeted TypeScript, protocol, docs, and field-pipeline tests; 55 Python page tests; extension and protocol typechecks; affected TypeScript lint and changeset formatting pass.

Reviewer testing: register a tool with consequentialHint: true and debugging: true in a supporting Chrome build. Verify page.tools() preserves both flags, explicit false values, and omitted fields.

@changeset-bot

changeset-bot Bot commented Oct 19, 2026 •

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: ebe27ed

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 23 packages
Name Type
@browserbasehq/stagehand-extension Patch
@browserbasehq/stagehand Patch
@browserbasehq/stagehand-python Patch
browse Patch
@browserbasehq/stagehand-examples Patch
@browserbasehq/stagehand-integrations-claude-cua-sdk Patch
@browserbasehq/stagehand-integrations Patch
@browserbasehq/eve Patch
@browserbasehq/stagehand-integrations-gemini-cua-sdk Patch
@browserbasehq/stagehand-integrations-example-pi-facade Patch
@browserbasehq/stagehand-integrations-claude-agent-sdk Patch
@browserbasehq/stagehand-integrations-example-claude-code-facade Patch
@browserbasehq/stagehand-integrations-codex-sdk Patch
@browserbasehq/stagehand-integrations-example-codex-facade Patch
@browserbasehq/stagehand-integrations-cursor-sdk Patch
@browserbasehq/stagehand-integrations-example-cursor-facade Patch
@browserbasehq/stagehand-integrations-deepagents-sdk Patch
@browserbasehq/stagehand-integrations-eve-sdk Patch
@browserbasehq/stagehand-integrations-fx-sdk Patch
@browserbasehq/stagehand-integrations-mastra-sdk Patch
@browserbasehq/stagehand-integrations-example-mastra-facade Patch
@browserbasehq/stagehand-integrations-pi-sdk Patch
@browserbasehq/stagehand-integrations-example-vercel-ai-facade Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@github-actions

Copy link
Copy Markdown
Contributor

This PR is from an external contributor and must be approved by a stagehand team member with write access before CI can run.
Approving the latest commit mirrors it into an internal PR owned by the approver.
If new commits are pushed later, the internal PR stays open but is marked stale until someone approves the latest external commit and refreshes it.

@github-actions github-actions Bot added external-contributor Tracks PRs mirrored from external contributor forks. external-contributor:awaiting-approval Waiting for a stagehand team member to approve the latest external commit. labels Oct 19, 2026
@vishalanton16
vishalanton16 marked this pull request as ready for review October 19, 2026 16:40
@vishalanton16
vishalanton16 requested a review from a team as a code owner October 19, 2026 16:40
@socket-security

socket-security Bot commented Oct 19, 2026 •

Copy link
Copy Markdown

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Updatednpm/​devtools-protocol@​0.0.1657692 ⏵ 0.0.1721602100 +110084 +598 +1100

View full report

@oddharsh

Copy link
Copy Markdown

I ran this branch against real Chrome to check the CDP side. The page registers one tool with annotations: { readOnlyHint: true, untrustedContentHint: true, consequentialHint: true, debugging: true }, and I read WebMCP.toolsAdded straight off CDP:

Chrome Raw CDP annotations page.tools() on main page.tools() on this branch
155.0.8059.85 (stable) readOnly, untrustedContent, consequential readOnly, untrustedContent adds consequential
158.0.8113.0 (canary) same, plus debugging readOnly, untrustedContent adds consequential; debugging still dropped

Stable already sends consequential, so main is dropping a live hint in webMCPAnnotation() today. This branch fixes that on both builds.

Canary also sends debugging. The spec defines it next to consequentialHint (a tool "intended for debugging and developer tooling rather than end-user interactions"), and it's already in devtools-protocol@0.0.1721602, the version this PR bumps to. Adding it is the same change again: one line in webMCPAnnotation(), one in WebMCPAnnotationSchema, then regen. Want to fold it in here, or should I send it as a follow-up after this merges? I can also open a PR into your branch if that's easier.

Raw WebMCP.toolsAdded (stackTrace removed)
Chrome 155.0.8059.85
[{"name":"t","description":"d","annotations":{"readOnly":true,"untrustedContent":true,"consequential":true},"frameId":"73FD864D078CD7AD48D46B62AE37DEAE"}]

Chrome 158.0.8113.0 canary
[{"name":"t","description":"d","annotations":{"readOnly":true,"untrustedContent":true,"consequential":true,"debugging":true},"frameId":"0EF9481B4E2B2FA5D5697A1E7AC82E4C"}]

AI-assisted. Recon, Chrome probes, and comment text by houseguest.

@vishalanton16 vishalanton16 changed the title feat(webmcp): expose consequential tool annotations feat(webmcp): expose consequential and debugging tool annotations Oct 23, 2026
@vishalanton16

Copy link
Copy Markdown
Author

@oddharsh

Thanks for testing both Chrome builds and reporting the new debugging field! I’ve folded debugging support into this PR.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

external-contributor:awaiting-approval Waiting for a stagehand team member to approve the latest external commit. external-contributor Tracks PRs mirrored from external contributor forks.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants