INNER CODE UNIT · Python
browser_take_screenshot
feder-cr/Jobs_Applier_AI_Agent_AIHawk · src/aihawk/mcp/server.py:360
async def browser_take_screenshot() -> Image:
"""One screenshot of the active tab, on demand."""
png = await actions.screenshot_png(await registry.ensure())
return Image(data=png, format="png")
@mcp.tool()
async def browser_watch() -> Image:
"""The whole browser window as a person at the machine sees it: tab strip,
address bar, the page and the pointer, from a live capture kept running on
the active tab. For watching the work, not for acting on it: the picture
is window pixels, so do not feed its coordinates to browser_click_at; use
browser_take_screenshot for that."""
jpeg = await actions.watch_jpeg(await registry.ensure())
return Image(data=jpeg, format="jpeg")
# --- acting ----------------------------------------------------------------