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)
Behavior2/5

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

With no annotations provided, the description carries full burden. It discloses that script tags are removed by default, which is useful behavioral context. However, it doesn't mention other critical traits: whether this is a read-only operation, potential performance impacts, error conditions, or output format details. For a tool with 8 parameters and no annotations, 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 two sentences, front-loaded with the core purpose. Every word earns its place: the first sentence states what the tool does, and the second clarifies a key default behavior. No redundancy or fluff, making it highly efficient for an AI agent.

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

Completeness3/5

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

Given 8 parameters with full schema coverage and no output schema, the description is minimally complete. It covers the basic purpose and one behavioral trait (script removal), but lacks context about when to use it, error handling, or output structure. For a tool with many configuration options, more guidance would be helpful, but it's not entirely inadequate.

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 the schema fully documents all 8 parameters. The description adds minimal value beyond the schema: it only explains the default for removeScripts (true) and implies it's a key parameter. No additional semantics, examples, or constraints are provided, meeting the baseline for high schema coverage.

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'), but doesn't explicitly differentiate from sibling tools like playwright_get_visible_text, which suggests similar but text-focused functionality. The mention of script tag removal adds specificity but not sibling distinction.

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 like playwright_get_visible_text or playwright_screenshot. It mentions a default behavior (removing script tags) but doesn't explain use cases, prerequisites, or exclusions. This leaves the agent without contextual decision-making help.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/aakashH242/mcp-playwright'

If you have feedback or need assistance with the MCP directory API, please join our Discord server