Skip to main content
Glama

get_content

Extract visible text, HTML, or linked URLs from a current page or selected element to retrieve actual content for scraping, crawling, or link discovery.

Instructions

Read visible text, HTML, or discovered URLs from the current page.

Use this tool when you need actual page content or URL information rather than page metadata.

Args: selector: Optional CSS selector or SeleniumBase text-matching selector identifying the element whose content should be read. For output_format="text" or "html", the selector scopes the returned content to that element. For output_format="urls", the selector scopes URL discovery to URLs within that element. When omitted, the operation applies to the whole page.

output_format:
    - "text": Return visible text from the page or selected element.
    - "html": Return HTML from the page or selected element.
    - "urls": Return all discovered linked/resource URLs on the page
      or within the selected element. URLs associated with elements
      such as anchors, links, images, scripts, and metadata may be
      included. SeleniumBase returns full URLs with their URL
      prefixes.

include_shadow_dom: When output_format="html" and selector is omitted,
    include any shadow-root HTML present in the page. This option has
    no effect for "text" or "urls", or when a selector is specified.

Returns: For output_format="text", a string containing visible text. For output_format="html", a string containing HTML. For output_format="urls", a list of URL strings. This is useful for crawling, link discovery, resource inspection, and finding candidate URLs before navigating to them.

Tool selection: - Need URL, title, origin, or User-Agent -> use get_page_info. - Need visible text -> use output_format="text". - Need page or element HTML -> use output_format="html". - Need URLs from the page or an element -> use output_format="urls". - Need structured information about matching elements -> use find_elements. - Need to check whether an element is present or visible -> use check_for_condition. - Need to wait for content to appear -> use wait_for.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
selectorNo
output_formatNotext
include_shadow_domNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Install Server

TDQS

A5/5.0
Behavior5/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 covers selector scoping, all three output_format behaviors, the exact effect of include_shadow_dom, URL prefix behavior, and return types. It also notes when include_shadow_dom has no effect, providing useful operational detail beyond a surface-level summary.

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 lengthy but well-structured into summary, Args, Returns, and Tool selection sections. Every sentence serves a purpose, and the core purpose is front-loaded in the first sentence. The organization makes it easy for an agent to scan for relevant details.

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?

All three optional parameters are thoroughly documented, return values are described per output format, and explicit sibling-tool routing is provided. The presence of an output schema reduces the burden for return-value details, and the description still covers them. Nothing needed for correct invocation appears missing.

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?

Schema description coverage is 0%, so the description fully compensates by explaining each parameter in detail: selector's scoping behavior and text-matching capability, each output_format option with return semantics, and include_shadow_dom's conditional effect. This is far more informative than the bare schema.

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 opens with a specific, multi-format statement: 'Read visible text, HTML, or discovered URLs from the current page.' It clearly identifies the resource (current page) and the supported output modes, and the 'Tool selection' section explicitly distinguishes it from siblings like get_page_info, find_elements, check_for_condition, and wait_for.

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?

The description includes both an explicit 'Use this tool when...' statement and a detailed 'Tool selection' bullet list naming sibling tools and the conditions under which each should be preferred. An agent can immediately determine when to choose get_content versus alternatives such as get_page_info or find_elements.

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

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'

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