Skip to main content
Glama

Browser Get Html

browser_get_html

Extract HTML content from a page or CSS-selected element via innerHTML or outerHTML, with large output saved to a file to prevent context bloat.

Instructions

Get HTML content of an element or the full page. For large HTML (>50KB), returns a File to avoid context bloat. Prefer sap_get_screen_text or sap_get_form_fields for structured SAP data. Args: selector = CSS selector (None for full page), outer = include element itself (outerHTML) or just children (innerHTML).

Session parameter:

  • session=None (default): Uses primary session ("s1")

  • session="s2": Targets specific session (for parallel agents)

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "browser_get_html"
  }
}

Input Schema

NameRequiredDescriptionDefault
outerNoInclude element itself (outerHTML) or just children (innerHTML).
sessionNoSession ID (e.g., "s1", "s2"). None uses primary session.
agent_idNoAgent identifier for binding check. Optional.
selectorNoCSS selector (None for full page).

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.1/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations exist, so the description carries the full burden, and it does disclose a non-obvious behavioral trait: outputs over 50KB are returned as a File rather than inlined to avoid context bloat. It also explains the session targeting model (s1 primary vs. s2 for parallel agents). It does not say what happens on a non-matching selector or errors, and with no output schema the exact return shape (path vs. handle) is unstated.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loaded with the core purpose and the context-bloat mitigation, both of which matter most. The trailing Args block duplicates schema text verbatim and could be dropped, but it does not obscure the leading content.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a read-only browser extraction tool with no annotations and no output schema, the description covers the main risks an agent needs: result size handling, structured-alternative routing, and session targeting. Missing only edge-case behavior such as selector-not-found handling and the concrete form of the File return.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so all four parameters are already documented structurally; the 'Args:' block largely restates the schema definitions. The one piece of added meaning is the session note tying s2 to parallel agents, plus confirming selector=None means full page.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource ('Get HTML content of an element or the full page') with the two modes (element vs. full page) made explicit. It also distinguishes itself from the SAP siblings by name, so an agent can decide between raw HTML and structured SAP extraction without opening another schema.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicitly routes the agent to sap_get_screen_text or sap_get_form_fields when structured SAP data is wanted, which is a real alternative-with-condition statement. It stops short of covering the other plausible alternatives in the catalog (browser_snapshot, browser_evaluate) or saying when raw HTML is the wrong choice for a non-SAP page.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.