Skip to main content
Glama

get_content

Retrieve visible text, HTML, or discovered URLs from a page or element to access actual content for crawling, link discovery, or scraping.

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 element presence/visibility -> use check_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

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. Addedv1.2.1

TDQS

A4.7/5.0
Behavior4/5

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

With no annotations, the description carries the full behavioral burden. It thoroughly explains what each output_format returns, how selector scopes the result, and the include_shadow_dom default behavior. It does not describe failure modes or edge cases like empty results, but for a read-only content tool this is a minor omission.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is lengthy but well-organized into Args, Returns, and Tool selection sections. Each section adds value, and the core purpose is front-loaded. Minor redundancy between the intro use-case sentence and the Tool selection list, but it is not wasteful.

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?

The description is complete for a tool of this complexity: it documents every parameter, defines all output formats, explains return types, and provides routing guidance to five sibling tools. The presence of an output schema additionally covers structured return details, so nothing an agent needs to invoke correctly is 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%, but the description fully compensates by explaining all three parameters with concrete semantics: selector scoping per output_format, the exact meaning of each enum value, and include_shadow_dom's effect and default. This goes far beyond the schema's bare property names and defaults.

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 opening sentence states a specific action and resource: 'Read visible text, HTML, or discovered URLs from the current page.' It clearly distinguishes from siblings by listing specific alternatives in Tool selection, such as get_page_info for metadata, find_elements for structured element info, and check_condition for presence/visibility.

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 Tool selection section explicitly maps user needs to the correct tool (e.g., 'Need URL, title, origin, or User-Agent -> use get_page_info') and to the correct output_format. The introductory sentence also sets the general condition: use when you need actual page content or URL information rather than page metadata.

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

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