Skip to main content
Glama

get_content

Retrieve visible text, HTML, or URLs from a selected page element when you need actual content rather than metadata. Pick text, html, or urls output; it waits for the element and returns normalized URLs.

Instructions

Read visible text, HTML, or discovered URLs from the selected element.

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

Args: selector: CSS selector or SeleniumBase-supported XPath selector. Default: "body".

output_format:
    - "text": Return visible text from the selected element.
    - "html": Return HTML from the selected element.
    - "urls": Return URLs discovered by SeleniumBase within the
      selected element. Returned URLs are normalized to full URLs
      with their protocol prefixes.

timeout: Maximum seconds to wait for the target element. Default: 5.

Tool selection: - Need URL, title, origin, or User-Agent -> use get_page_info. - Need visible text, html, or URLs on a page -> use get_content. - Need structured information about matching elements -> use find_elements. - Need to check element presence/visibility -> use check_if_condition. - Need to wait for content to appear -> use wait_for_condition.

If there's no matching element found within the timeout, then @handle_sb_errors returns details from the exception raised.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
timeoutNo
selectorNobody
output_formatNotext

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.15.0

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 carries the full burden and adds meaningful behavior: it defines output_format semantics, notes URL normalization to full protocol-prefixed URLs, states the timeout default and its failure behavior, and mentions @handle_sb_errors exception handling. It does not cover authentication or rate limits, but for a read-oriented content tool this is strong disclosure.

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 front-loaded with purpose, then structured into Args and Tool selection sections. Each sentence adds routing or parameter semantics, and the length is justified by the need to compensate for absent schema descriptions and annotations.

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 an output schema exists, the description need not explain return values, and it appropriately focuses on selection, parameters, and failure behavior. It fully covers what an agent needs to invoke the tool correctly despite no annotations and 0% schema description coverage.

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 must compensate fully. It documents all three parameters: selector syntax and default, timeout meaning and default, and each output_format enum value with its exact return behavior. It adds substantial meaning beyond 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 verb+resource: 'Read visible text, HTML, or discovered URLs from the selected element.' It explicitly distinguishes itself from metadata retrieval by naming get_page_info and other alternatives, so an agent can select it without opening the schema.

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?

It provides an explicit 'Tool selection' routing list that maps five distinct needs to five sibling tools, including get_page_info, find_elements, check_if_condition, and wait_for_condition. This is unambiguous when-to-use guidance with named alternatives.

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