Skip to main content
Glama

get_page_html

Retrieve raw HTML of page elements with CSS selectors, or full page HTML, to inspect component structure and content.

Instructions

Return raw outerHTML of matching elements, or full page HTML if no selector. Useful for inspecting component structure. Standard CSS selectors only — Playwright-specific pseudo-classes (:has-text, :visible) are not supported here.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
selectorNoCSS selector (optional — omit for full page HTML)
max_lengthNoMax characters to return (default: 50000)
session_idYesSession ID
Behavior3/5

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

With no annotations provided, the description carries the full burden. It discloses the return type (raw outerHTML) and the unsupported selectors, but it does not specify behavior when multiple elements match (returns all or first?), truncation based on max_length, or performance implications for large HTML. More transparency would be beneficial.

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 long, with the first sentence stating the core functionality and the second providing context and a limitation. Every sentence is necessary and there is no fluff. It is appropriately front-loaded.

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 simple tool with three parameters and no output schema, the description is fairly complete. It covers purpose, usage context, and a limitation. Minor gaps exist: it does not explain max_length truncation behavior or whether multiple matches return a concatenated string or first match, but overall it meets the needs for an agent to use the tool correctly.

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

Parameters4/5

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

Schema description coverage is 100% (all parameters have descriptions), so baseline is 3. The description adds value by clarifying that the selector is optional and that omitting it returns full page HTML, which is not explicitly stated in the schema. This extra context justifies a 4.

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?

The description clearly states the tool returns raw outerHTML of matching elements or full page HTML if no selector is provided. It also mentions it's useful for inspecting component structure, which distinguishes it from siblings like get_page_elements that likely return element properties rather than HTML.

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?

The description gives clear context on when to use the tool (for component structure inspection) and explicitly states a limitation: Standard CSS selectors only, Playwright-specific pseudo-classes are not supported. This tells the agent when not to use it, but it does not explicitly name alternative tools for those cases.

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/segentic-lab/periscope-mcp'

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