Skip to main content
Glama
yogesh-joshi-0333

browser-control-mcp-server

Get Browser DOM

browser_get_dom

Retrieve the rendered HTML DOM of a web page or subtree to find CSS selectors, inspect element attributes, analyze page structure, and extract content for automation tasks.

Instructions

Get the HTML source code of the current page (or a scoped subtree). Returns the rendered DOM including dynamically loaded content. Use this to: find CSS selectors for browser_click/browser_type, understand page structure, check element attributes and classes, inspect form fields, or analyze the page content as HTML or plain text. For large pages, prefer browser_snapshot (accessibility-tree view) or scope with selector — a full-page dump can be tens of thousands of characters.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
modeNoForce a specific mode. Defaults to extension.
formatNo"html" (default) returns markup. "text" strips tags and returns visible text only — much smaller for reading content.
selectorNoCSS selector to scope the result to a single subtree instead of the whole page. Prefix with "pierce/" to reach into shadow DOM.
maxLengthNoTruncate the returned dom string to this many characters. Omit for no limit (default).
sessionIdNoPuppeteer session ID for headless mode. Skips mode selection.
frameIndexNoRead a specific iframe by index (from browser_frames) instead of the main page.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.5.0

TDQS

A4.5/5.0
Behavior4/5

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

No annotations are supplied, so the description carries the full burden, and it discloses meaningful traits: the return is a *rendered* DOM including dynamically loaded content, and a full-page dump can be tens of thousands of characters (implying cost/size implications). It does not explicitly state the operation is read-only/non-mutating, but 'Get' and the described return value make that unambiguous.

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?

Front-loads the purpose, then a compact list of use cases, then the large-page caveat with the alternative. Every sentence earns its place and the critical routing advice is not buried.

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

Completeness5/5

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

With no output schema, the description explains what is returned (rendered HTML or tag-stripped text) and the size risk, and all six parameters are documented in the schema. An agent has enough to call it correctly and to know when to fall back to browser_snapshot.

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 every parameter (mode, format, selector, maxLength, sessionId, frameIndex) is already documented in the schema. The description reinforces selector scoping and the smaller text format, but adds no syntax or format detail beyond the schema, so the baseline 3 applies.

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 the HTML source code of the current page (or a scoped subtree)', and clarifies it returns the rendered DOM with dynamically loaded content. It also names browser_snapshot as the sibling to use instead for large pages, letting an agent distinguish it without comparing schemas.

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

Usage Guidelines5/5

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

Explicitly enumerates when to use it ('find CSS selectors for browser_click/browser_type, understand page structure, check element attributes...') and when not to ('For large pages, prefer browser_snapshot ... or scope with selector'). Both the condition and the alternative are provided.

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