Skip to main content
Glama

get_page_content

Extract visible text or HTML from a chosen element or the entire page, optionally including shadow DOM content for full page data.

Instructions

Get the visible text or HTML of an element, or of the whole page. Args: selector: Element to read from. Omit (or pass None) to read the whole page instead of one element. as_html: If True, return HTML instead of visible text. include_shadow_dom: Only applies when reading the whole page as HTML.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
as_htmlNo
selectorNo
include_shadow_domNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior4/5

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

With no annotations, the description discloses the read-only nature of the call ('Get'), the two output modes (visible text vs HTML), and the scope condition for include_shadow_dom. It does not address edge cases like missing selectors or element-not-found behavior, but for a read operation this is solid.

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 one-sentence summary is immediately followed by a compact Args list. Every line earns its place, and there is no filler or repetition of schema defaults.

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?

Given an output schema exists, return shape is covered structurally; the description covers all parameters and modes. The main omission is selector syntax (CSS/XPath), which is likely shared with sibling tools, so the gap is minor.

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

Parameters5/5

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

Even though schema description coverage is 0%, the Args block documents all three parameters with meaning beyond the schema: selector's null behavior switches scope to the whole page, as_html flips output format, and include_shadow_dom is scoped to whole-page HTML. This fully compensates for the empty schema descriptions.

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 leads with a specific verb ('Get') and a precise resource ('visible text or HTML of an element, or the whole page'). This clearly distinguishes the tool from page-info, attributes, and URL-listing siblings.

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?

It gives conditional guidance for selector and as_html, and notes when include_shadow_dom applies, but it never names a sibling tool or states when this should be preferred over get_page_info or get_attributes. Usage context is implied by the purpose rather than explicitly routed.

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/seleniumbase/seleniumbase-mcp'

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