INNER CODE UNIT · Python
session_close_page
feder-cr/Jobs_Applier_AI_Agent_AIHawk · src/aihawk/mcp/server.py:285
async def session_close_page(page_id: str = "") -> str:
"""Close a tab, or the active one when page_id is left out."""
return await actions.close_page(await registry.ensure(), page_id)
# --- reading ---------------------------------------------------------------
@mcp.tool()
async def browser_navigate(url: str, wait_until: str = "domcontentloaded") -> str:
"""Go to a url in the active tab, opening one if none exists.
wait_until is "domcontentloaded" by default, which returns as soon as the
markup is parsed. Use "load" when the page needs its images and stylesheets,
or "networkidle" for a single-page app that fetches its content after
load."""
return await _retrying(actions.navigate, url, wait_until=wait_until)