Skip to main content
Glama

get_content

Extract visible text, HTML, or linked URLs from the current page or a specific element for scraping, crawling, and resource inspection.

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. Addedv4.53.3

TDQS

A4.8/5.0
Behavior4/5

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

With no annotations, the description fully carries the behavioral disclosure burden. It explains returned types per output_format, the effect of include_shadow_dom (and when it has no effect), and that URLs are returned as full URL strings. This is strong transparency, though it could also explicitly state that the operation is read-only and non-mutating.

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 efficiently organized with clear 'Args:', 'Returns:', and 'Tool selection:' sections. The opening sentence states the core purpose immediately, and every subsequent line adds necessary detail without redundancy.

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 moderate complexity, zero annotations, and complete parameter documentation in the description, it is fully self-contained. It covers what the tool returns, how parameters affect behavior, and how to choose between this and sibling tools. No critical information is missing for correct invocation.

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 coverage is 0%, so the description must fully explain each parameter. It does so in detail: selector scoping behavior per format, the meaning of each output_format enum, and the exact conditions under which include_shadow_dom applies. No parameter is left ambiguous.

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 verb and resource: 'Read visible text, HTML, or discovered URLs from the current page.' It clearly distinguishes from siblings by naming alternative tools for different needs, such as get_page_info for metadata and find_elements for structured element info.

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?

A dedicated 'Tool selection' section explicitly lists when to use this tool versus alternatives like get_page_info, find_elements, check_condition, and wait_for. It also maps each output_format value to the appropriate use case, leaving no ambiguity.

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'

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