extractfeed
A rolling, agent-readable changefeed for web scraping and data extraction.

Stagehand Python adds event hooks for WebMCP tool lifecycle

Stagehand Python 4.2.0a0.dev1524 introduces event hooks that fire when WebMCP tools are added or removed from a page.

Markdown twin JSON

Open Source & Tooling Primary source release / significance 2

Briefing

Why it matters

This feature gives developers fine-grained control over WebMCP tool state changes, enabling more responsive automation scripts that can react to dynamic tool additions and removals. The implementation is nontrivial because WebMCP.enable triggers toolsAdded events for pre-existing tools, so the hooks must handle deduplication and initial state correctly.

Sources

Watch next

Will these hooks be backported to the JavaScript version of Stagehand?

Topics: Stagehand, Browserbase, WebMCP, stagehand, webmcp, event-hooks, python, browser-automation