Skip to main content
Glama

get_content

Extract visible text, HTML, or URLs from a web element. Use when you need actual page content rather than metadata.

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.

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 -> 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
timeoutNo
selectorNobody
output_formatNotext

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed5 schema fields changedv4.54.2
    • removedInput schema / properties / include_shadow_dom
      Removed value: -{
      -  "default": true,
      -  "title": "Include Shadow Dom",
      -  "type": "boolean"
      -}
    • removedInput schema / properties / selector / anyOf
      Removed value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • changedInput schema / properties / selector / default
      Previous value: -nullNew value: +"body"
    • addedInput schema / properties / selector / type
      Added value: +"string"
    • addedInput schema / properties / timeout
      Added value: +{
      +  "default": 5,
      +  "title": "Timeout",
      +  "type": "number"
      +}
  2. Addedv4.53.3

TDQS

A4.3/5.0
Behavior3/5

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

No annotations are provided, so the description carries the full behavioral burden. It usefully discloses the timeout default of 5 seconds and that returned URLs are normalized with protocol prefixes, but it says nothing about failure behavior (e.g., element not found / timeout expiry) or that this is a non-mutating read.

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?

Front-loaded core sentence followed by Args and tool-selection blocks; each line is informative. The tool-selection list slightly restates the output_format descriptions, costing a little redundancy.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With an output schema present, return-value detail is not required, and the description still clarifies format semantics. It covers params and alternatives well; the only shortfall is unstated error/timeout behavior for a browser-automation read tool.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/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, and it largely does: it defines selector as CSS or SeleniumBase XPath, enumerates all three output_format values with meaning, and states the timeout default. Only minor gaps remain (e.g., selector default 'body').

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?

Opens with a specific verb+resource: 'Read visible text, HTML, or discovered URLs from the selected element.' An agent can distinguish it from siblings like get_page_info and find_elements directly from this sentence.

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' block explicitly names the conditions that route to get_page_info, find_elements, check_condition, wait_for, and the three internal output_format modes. This is exactly the when-to-use/when-to-not guidance an agent needs.

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