INNER CODE UNIT · Python
browser_read_text
feder-cr/Jobs_Applier_AI_Agent_AIHawk · src/aihawk/mcp/server.py:304
async def browser_read_text(selector: str = "body", max_chars: int = 6000) -> str:
"""The visible text of an element, with the markup gone.
The cheapest way to read a page. Narrow the selector when you know where the
answer is; use browser_read_html instead when the structure matters, or
browser_snapshot when you need something to click.
Long text is cut at max_chars (6000 by default) and the cut is marked in
what comes back, so text that ends without that marker is the whole thing."""
return await actions.read_text(await registry.ensure(), selector, max_chars)
@mcp.tool()
async def browser_snapshot(max_chars: int = 0) -> str:
"""Title, url, and the interactive elements that are actually visible.
Each element carries a `selector` when one can reach it: pass that string to
browser_click or browser_type VERBATIM. It is built to match exactly one