Skip to main content
Glama

playwright_get_visible_html

Extract visible HTML content from web pages with options to remove scripts, styles, comments, and meta tags for cleaner output.

Instructions

Get the HTML content of the current page. By default, all tags are removed from the output unless removeScripts is explicitly set to false.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
selectorNoCSS selector to limit the HTML to a specific container
removeScriptsNoRemove all script tags from the HTML (default: true)
removeCommentsNoRemove all HTML comments (default: false)
removeStylesNoRemove all style tags from the HTML (default: false)
removeMetaNoRemove all meta tags from the HTML (default: false)
cleanHtmlNoPerform comprehensive HTML cleaning (default: false)
minifyNoMinify the HTML output (default: false)
maxLengthNoMaximum number of characters to return (default: 20000)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

C2.9/5.0
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It mentions that script tags are removed by default, which is a useful behavioral trait. However, it doesn't cover other critical aspects like whether this tool requires a page to be loaded, if it's read-only or has side effects, potential performance impacts, or error handling. For a tool with 8 parameters and no annotation coverage, this is insufficient.

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?

The description is extremely concise with just two sentences that directly address the tool's core functionality and a key parameter behavior. Every word serves a purpose, and it's front-loaded with the main purpose. There's no wasted language or redundancy.

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

Completeness2/5

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

Given the tool's complexity (8 parameters, no annotations, no output schema), the description is incomplete. It doesn't explain what 'visible HTML' means in practice (e.g., rendered DOM vs. source), how it interacts with dynamic content, or what the return format looks like. For a tool that likely returns substantial HTML data, more context about output structure or limitations would be helpful.

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?

The description adds minimal parameter semantics beyond the schema. It clarifies the default behavior for 'removeScripts' (true unless explicitly set to false), which isn't fully captured in the schema's description. However, with 100% schema description coverage, the schema already documents all 8 parameters thoroughly. The description doesn't add meaningful context for other parameters like 'cleanHtml' or 'selector', so it meets the baseline of 3.

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?

The description clearly states the tool's purpose: 'Get the HTML content of the current page.' It specifies the verb ('Get') and resource ('HTML content'), making the function unambiguous. However, it doesn't explicitly differentiate from sibling tools like 'playwright_get_visible_text' or 'playwright_screenshot', which also retrieve page content in different formats.

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

Usage Guidelines2/5

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

The description provides no guidance on when to use this tool versus alternatives. It mentions a default behavior for script removal but doesn't compare it to other tools like 'playwright_get_visible_text' for text-only extraction or 'playwright_screenshot' for visual capture. There's no context about prerequisites or typical use cases.

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