Skip to content

stagehand-python@4.2.0a0.dev1590

@seanmcguire12 seanmcguire12 tagged this 08 Oct 21:01
# what changed
- added docs for `onToolsAdded()` & `onToolsRemoved()` hooks
- also updated the docs test to remove these events from ignored list


<!-- This is an auto-generated description by cubic. -->
---
## Summary by cubic
Adds reference documentation for the `onToolsAdded` and `onToolsRemoved`
hooks for TypeScript, Python, and Go, and removes the docs test
exception that previously skipped coverage for these hooks.

- Documents the subscription lifecycle, tool identity rules, and
callback signatures for `page.onToolsAdded()` and
`page.onToolsRemoved()`.
- Updates the WebMCP reference page to link to the new `onToolsAdded()`
docs.
- Removes `page/on-tools-added` and `page/on-tools-removed` from the
unreleased reference methods set so the SDK surface test now requires
these headings on every language page.

<sup>Written for commit a692e4d87d4a728b97daf15720427b9d1ff8757b.
Summary will update on new commits.</sup>

<a
href="https://cubic.dev/pr/browserbase/stagehand/pull/3148?utm_source=github"
target="_blank" rel="noopener noreferrer"
data-no-image-dialog="true"><picture><source
media="(prefers-color-scheme: dark)"
srcset="https://www.cubic.dev/buttons/review-in-cubic-dark.svg"><source
media="(prefers-color-scheme: light)"
srcset="https://www.cubic.dev/buttons/review-in-cubic-light.svg"><img
alt="View guided diff"
src="https://www.cubic.dev/buttons/review-in-cubic-light.svg"></picture></a>
<a
href="https://www.cubic.dev/action/auto-fix/pr/browserbase/stagehand/3148?returnTo=https%3A%2F%2Fgithub.com%2Fbrowserbase%2Fstagehand%2Fpull%2F3148&source=description"
target="_blank" rel="noopener noreferrer"
data-no-image-dialog="true"><picture><source
media="(prefers-color-scheme: dark)"
srcset="https://www.cubic.dev/buttons/turn-on-auto-fix-dark.svg"><source
media="(prefers-color-scheme: light)"
srcset="https://www.cubic.dev/buttons/turn-on-auto-fix-light.svg"><img
alt="Turn on auto-fix"
src="https://www.cubic.dev/buttons/turn-on-auto-fix-light.svg"></picture></a>

<!-- End of auto-generated description by cubic. -->
Assets 2
Loading