Skip to main content
Glama

get_text

Retrieve visible text from any web element using CSS selectors or XPath. Extract page content for assertions or data capture in browser automation.

Instructions

Get the visible text content of an element.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
byNoLocator strategycss
timeoutNoWait timeout in seconds
selectorYesCSS selector, XPath, or other locator value

Schema Changelog

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

  1. First observedv1.0.0

TDQS

B3.4/5.0
Behavior3/5

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

The word 'visible' is a genuine behavioral disclosure, indicating that hidden text is excluded. However, with no annotations provided, the description does not address return type, empty/not-found behavior, or whether it waits for the element, leaving the timeout parameter to imply wait behavior.

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?

One clear sentence with no filler or redundant content. 'Visible' meaningfully qualifies the returned content, and the core action is front-loaded and immediately understandable.

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

Completeness2/5

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

For a 3-parameter tool with no output schema and no annotations, the description leaves ambiguity about which element is selected when multiple match and what happens on timeout or no match. It is sufficient for simple use but incomplete for edge-case behavior.

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

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, with by, timeout, and selector all already documented. The description adds no additional parameter-level meaning, so the baseline of 3 is appropriate.

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?

States a specific operation ('get visible text content') on a specific resource ('an element'). This clearly differentiates it from siblings like get_page_source, get_page_title, and get_attribute, even though no sibling is named.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Provides no guidance on when to use this tool versus alternatives like get_attribute, find_element, or assert_text. It also does not mention preconditions such as waiting for the element to exist before calling.

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/hakanngul/testfly-mcp'

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