Skip to main content
Glama

get_content

Extract visible text, HTML, or linked URLs from the current page or a selected element, enabling content analysis and 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, the description carries the full burden. It discloses return types for each output_format, explains the effect of include_shadow_dom (including when it is ignored), and reveals URL discovery behavior (including resource types and URL prefixing). This goes beyond a simple 'read' and details operational traits an agent needs to anticipate results.

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 long but every sentence is purposeful. It is structured into clear sections (Args, Returns, Tool selection) and front-loads the core purpose. The multiple paragraphs are justified by the tool's complexity (three parameters, three output modes, shadow DOM handling). There is no redundant phrasing or filler.

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?

Given the tool's richness (three parameters, three return types, shadow DOM nuance, and a large sibling set), the description covers all essential aspects: parameter behavior, return formats, and usage disambiguation. The presence of an output schema is complemented by the description's explicit return type explanations, leaving no critical gap for an agent to resolve correctly.

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?

The input schema has zero descriptions (coverage 0%), so the description must fully compensate. It does: selector is explained as an optional scoping mechanism for all formats, output_format is elaborated with concrete meaning for each enum value, and include_shadow_dom is clarified with conditions. This adds substantial semantic value beyond the schema's bare type definitions.

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 clear statement of the tool's function: 'Read visible text, HTML, or discovered URLs from the current page.' This identifies the specific verb (read), resource (current page), and output formats. It distinguishes itself from siblings via a dedicated 'Tool selection' section that lists alternatives for metadata (get_page_info), structure (find_elements), presence checks (check_for_condition), and waits (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 explicitly states when to use the tool ('Use this tool when you need actual page content or URL information rather than page metadata') and provides a comprehensive 'Tool selection' section that maps needs to specific sibling tools (e.g., 'Need URL, title, origin, or User-Agent -> use get_page_info'). This gives explicit when/when-not guidance without leaving inference to the agent.

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

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