Skip to main content
Glama

Get Content

get_content
Read-onlyIdempotent

Extract visible text, HTML, or URLs from any page element using a CSS or XPath selector.

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 observedv0.1.0

TDQS

A4.7/5.0
Behavior4/5

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

Annotations already declare readOnlyHint, openWorldHint, idempotentHint, and destructiveHint=false. The description adds valuable behavioral context beyond that: it specifies timeout wait behavior, URL normalization details, and the error-handling fallback via @handle_sb_errors when no element matches. This goes beyond what annotations provide, earning a 4.

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 well-structured with clear sections: initial summary, Args, Tool selection, and error note. While a bit long, each sentence earns its place—the tool selection list is genuinely useful, and the argument descriptions are concise. It is front-loaded with the core purpose, and the length is justified by the need to explain three output formats and sibling routing.

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?

For a tool with 3 optional parameters, the description covers everything an agent needs: the exact purpose, all parameter semantics, defaults, output format behaviors, timeout, error handling, and clear guidance on when to use it versus siblings. Even if an output schema exists, the description explains the return types conceptually (visible text, html, urls) and the URL normalization behavior, ensuring complete understanding.

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 carries the full burden for parameter explanation. It describes 'selector' with type and default, 'output_format' with each enum value and its meaning, and 'timeout' with default and purpose. This fully compensates for the lack of schema descriptions and adds meaning far beyond the raw 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 clearly states 'Read visible text, HTML, or discovered URLs from the selected element.' It specifies the verb (read), the resource (selected element), and the output types. It also explicitly contrasts with get_page_info, distinguishing page content versus metadata, which makes sibling differentiation clear.

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 provides explicit when-to-use guidance with a list mapping needs to specific tools (get_page_info, get_content, find_elements, etc.). It also states when to use this tool over metadata tools, leaving no ambiguity about when to select it.

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