Skip to main content
Glama
Mehmoodqureshi

MCP Browser Extension

get_html

Retrieve HTML from a Chrome page or element, using a CSS selector or ref to limit output; results are byte-capped at tag boundaries and password values are blanked.

Instructions

Get HTML of the page or an element. Output is capped (see maxBytes) and cut at a tag boundary; narrow it with selector rather than raising the cap when you can. Password field values are always blanked.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
refNoElement ref from a snapshot
outerNo
tabIdNoTab id (default: agent's tab)
frameIdNoFrame id from frames_list
maxBytesNoCap returned content at N UTF-8 bytes (default 262144); the full payload still lands in results/
selectorNoCSS selector (or pass ref)
allFramesNoAct on the first match in ANY frame (the element may be in an iframe)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.9.24
    • changedInput schema / properties / tabId / description
      Previous value: -"Tab id (default: active tab)"New value: +"Tab id (default: agent's tab)"
  2. Changed6 schema fields changedv0.9.5
    • changedInput schema / properties / allFrames / description
      Previous value: -"Search every frame of the tab and act on the first that matches - use when a selector should match but does not (the element is in an iframe)"New value: +"Act on the first match in ANY frame (the element may be in an iframe)"
    • changedInput schema / properties / frameId / description
      Previous value: -"Act inside this frame (ids come from frames_list)"New value: +"Frame id from frames_list"
    • changedInput schema / properties / maxBytes / description
      Previous value: -"Cap the returned content at this many UTF-8 bytes (default 262144). A truncated result reports truncated/totalBytes/returnedBytes. The full payload is still written to the task's results/ dir."New value: +"Cap returned content at N UTF-8 bytes (default 262144); the full payload still lands in results/"
    • changedInput schema / properties / ref / description
      Previous value: -"Element ref from a prior read (exactly one of selector|ref)"New value: +"Element ref from a snapshot"
    • changedInput schema / properties / selector / description
      Previous value: -"CSS selector (exactly one of selector|ref)"New value: +"CSS selector (or pass ref)"
    • changedInput schema / properties / tabId / description
      Previous value: -"Target tab id (defaults to the active tab)"New value: +"Tab id (default: active tab)"
  3. Changed3 schema fields changedv0.7.0
    • addedInput schema / properties / allFrames
      Added value: +{
      +  "description": "Search every frame of the tab and act on the first that matches - use when a selector should match but does not (the element is in an iframe)",
      +  "type": "boolean"
      +}
    • addedInput schema / properties / frameId
      Added value: +{
      +  "description": "Act inside this frame (ids come from frames_list)",
      +  "type": "number"
      +}
    • addedInput schema / properties / maxBytes
      Added value: +{
      +  "description": "Cap the returned content at this many UTF-8 bytes (default 262144). A truncated result reports truncated/totalBytes/returnedBytes. The full payload is still written to the task's results/ dir.",
      +  "type": "number"
      +}
  4. First observedv0.6.2

TDQS

A3.8/5.0
Behavior4/5

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

With no annotations the description carries the full burden, and it does disclose two non-obvious behaviors: output is capped and truncated at a tag boundary, and password field values are always blanked (a security-relevant behavior an agent should know). It omits auth/permission requirements and error behavior, but the disclosed traits are meaningful.

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

Conciseness5/5

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

Three short sentences, front-loaded with what the tool returns before the caveats. Every sentence carries information: scope, truncation behavior, and a selection tip.

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 7-parameter tool with no output schema, the description covers the essential return-shape caveats (byte cap, tag-boundary cut, blanked passwords) that the schema cannot express. Remaining gaps — default targeting when neither ref nor selector is given, and full-payload retrieval — are partly covered by the schema's maxBytes note.

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 86%, so the schema already documents ref, tabId, frameId, maxBytes, selector and allFrames. The description adds only cross-parameter advice about maxBytes and selector rather than new per-parameter meaning, which is the expected baseline when the schema does the heavy lifting.

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

Purpose4/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 of the page or an element') and immediately scopes what is returned, so an agent can tell it apart from text/markdown extraction siblings. It stops short of naming any sibling (get_text, read_as_markdown, snapshot) to differentiate itself explicitly.

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

Usage Guidelines3/5

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

Offers one concrete usage rule — narrow with `selector` rather than raising the cap — which is real guidance. However, it gives no when-to-use versus the sibling HTML/text/markdown extraction tools, and no prerequisites, so routing remains largely inferred.

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