INNER CODE UNIT · Python

browser_read_html

feder-cr/Jobs_Applier_AI_Agent_AIHawk · src/aihawk/mcp/server.py:494

async def browser_read_html(mode: str = "form", browser: Browser = None) -> str:
    """The page's HTML, cleaned down to what is worth reading.

    Use this when the STRUCTURE matters - a form and its labels, a table, what
    a control is wired to. `browser_snapshot` gives a flat inventory of things
    to click; this keeps the markup and the relationships inside it.

    mode="form" keeps the interactive surface and the text explaining it,
    mode="text" returns the prose alone, mode="full" keeps the structure with
    the noise and the attribute soup removed.

    Unlike browser_read_text this is NOT capped: it returns the whole reduced
    page, tens of thousands of characters on a large one. Cutting markup in the
    middle leaves tags that mean nothing, so it is not cut - but the answer can
    be long. Reach for browser_snapshot when you only need something to click.
    """
    return await work.acting(actions.read_html, mode, role=browser)

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…